one_msg_chat_api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +10 -0
- data/docs/AddTemplateRequest.md +24 -0
- data/docs/BlockUserRequest.md +18 -0
- data/docs/CallingApi.md +231 -0
- data/docs/CatalogApi.md +153 -0
- data/docs/ChannelApi.md +225 -0
- data/docs/ConversationalAutomation.md +22 -0
- data/docs/ConversationalAutomationCommandsInner.md +20 -0
- data/docs/CreateCommerce200Response.md +18 -0
- data/docs/CreateCommerceRequest.md +18 -0
- data/docs/CreateCommerceRequestParams.md +20 -0
- data/docs/CreateGroups200Response.md +18 -0
- data/docs/CreateReadMessage200Response.md +18 -0
- data/docs/CreateReadMessage401Response.md +18 -0
- data/docs/CreateReadMessageRequest.md +22 -0
- data/docs/DeleteFlowsFlowId200Response.md +20 -0
- data/docs/DeleteGroupsGroupId200Response.md +20 -0
- data/docs/DeleteMediaLegacyRequest.md +18 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/FlowsApi.md +836 -0
- data/docs/GetCommerce200ResponseInner.md +22 -0
- data/docs/GetMmLiteStatus200Response.md +22 -0
- data/docs/GetWebhook200Response.md +18 -0
- data/docs/GetWhatsappBusinessEncryption200Response.md +22 -0
- data/docs/GroupsApi.md +507 -0
- data/docs/ListBlockedUsers200Response.md +18 -0
- data/docs/ListFlows200Response.md +26 -0
- data/docs/ListMessages200Response.md +20 -0
- data/docs/ListTemplates200Response.md +22 -0
- data/docs/MessageSentResponse.md +24 -0
- data/docs/MessagingApi.md +1784 -0
- data/docs/PatchFlowsFlowIdAssets200Response.md +22 -0
- data/docs/ProfileApi.md +155 -0
- data/docs/ProfileInfo.md +32 -0
- data/docs/RetrieveMedia200Response.md +26 -0
- data/docs/SendAddressMessageRequest.md +32 -0
- data/docs/SendButtonRequest.md +24 -0
- data/docs/SendButtonRequestSectionsInner.md +20 -0
- data/docs/SendButtonRequestSectionsInnerReply.md +20 -0
- data/docs/SendCarouselRequest1.md +26 -0
- data/docs/SendContactRequest.md +20 -0
- data/docs/SendContactRequestContactsInner.md +30 -0
- data/docs/SendContactRequestContactsInnerName.md +28 -0
- data/docs/SendContactRequestContactsInnerOrg.md +22 -0
- data/docs/SendContactRequestContactsInnerPhonesInner.md +22 -0
- data/docs/SendCtaUrlRequest.md +32 -0
- data/docs/SendFileRequest.md +34 -0
- data/docs/SendFlowRequest1.md +46 -0
- data/docs/SendFlowRequest1Header.md +49 -0
- data/docs/SendFlowRequestHeader.md +49 -0
- data/docs/SendListRequest.md +26 -0
- data/docs/SendListRequestSectionsInner.md +20 -0
- data/docs/SendListRequestSectionsInnerRowsInner.md +22 -0
- data/docs/SendLocationRequest1.md +30 -0
- data/docs/SendLocationRequestRequest.md +20 -0
- data/docs/SendMessageRequest.md +24 -0
- data/docs/SendOrderDetailsRequest.md +36 -0
- data/docs/SendOrderDetailsRequestLanguage.md +20 -0
- data/docs/SendOrderDetailsRequestOrder.md +28 -0
- data/docs/SendOrderDetailsRequestOrderItemsInner.md +24 -0
- data/docs/SendOrderDetailsRequestOrderItemsInnerAmount.md +20 -0
- data/docs/SendPaymentRequestRequest.md +26 -0
- data/docs/SendReactionRequest.md +22 -0
- data/docs/SendStickerRequest.md +26 -0
- data/docs/SendTemplateRequest.md +32 -0
- data/docs/SendTemplateRequestLanguage.md +20 -0
- data/docs/SetWhatsappBusinessEncryptionRequest.md +21 -0
- data/docs/SuccessResponse.md +18 -0
- data/docs/TemplatesApi.md +301 -0
- data/docs/UpdateMeRequest.md +30 -0
- data/docs/UsersApi.md +223 -0
- data/docs/WebhooksApi.md +155 -0
- data/git_push.sh +57 -0
- data/lib/one_msg_chat_api/api/calling_api.rb +228 -0
- data/lib/one_msg_chat_api/api/catalog_api.rb +161 -0
- data/lib/one_msg_chat_api/api/channel_api.rb +225 -0
- data/lib/one_msg_chat_api/api/flows_api.rb +788 -0
- data/lib/one_msg_chat_api/api/groups_api.rb +486 -0
- data/lib/one_msg_chat_api/api/messaging_api.rb +1833 -0
- data/lib/one_msg_chat_api/api/profile_api.rb +157 -0
- data/lib/one_msg_chat_api/api/templates_api.rb +293 -0
- data/lib/one_msg_chat_api/api/users_api.rb +232 -0
- data/lib/one_msg_chat_api/api/webhooks_api.rb +157 -0
- data/lib/one_msg_chat_api/api_client.rb +441 -0
- data/lib/one_msg_chat_api/api_error.rb +58 -0
- data/lib/one_msg_chat_api/api_model_base.rb +88 -0
- data/lib/one_msg_chat_api/configuration.rb +400 -0
- data/lib/one_msg_chat_api/models/add_template_request.rb +176 -0
- data/lib/one_msg_chat_api/models/block_user_request.rb +164 -0
- data/lib/one_msg_chat_api/models/conversational_automation.rb +210 -0
- data/lib/one_msg_chat_api/models/conversational_automation_commands_inner.rb +208 -0
- data/lib/one_msg_chat_api/models/create_commerce200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_commerce_request.rb +164 -0
- data/lib/one_msg_chat_api/models/create_commerce_request_params.rb +192 -0
- data/lib/one_msg_chat_api/models/create_groups200_response.rb +149 -0
- data/lib/one_msg_chat_api/models/create_read_message200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_read_message401_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_read_message_request.rb +168 -0
- data/lib/one_msg_chat_api/models/delete_flows_flow_id200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/delete_groups_group_id200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/delete_media_legacy_request.rb +165 -0
- data/lib/one_msg_chat_api/models/error_response.rb +149 -0
- data/lib/one_msg_chat_api/models/get_commerce200_response_inner.rb +168 -0
- data/lib/one_msg_chat_api/models/get_mm_lite_status200_response.rb +165 -0
- data/lib/one_msg_chat_api/models/get_webhook200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/get_whatsapp_business_encryption200_response.rb +202 -0
- data/lib/one_msg_chat_api/models/list_blocked_users200_response.rb +149 -0
- data/lib/one_msg_chat_api/models/list_flows200_response.rb +189 -0
- data/lib/one_msg_chat_api/models/list_messages200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/list_templates200_response.rb +169 -0
- data/lib/one_msg_chat_api/models/message_sent_response.rb +179 -0
- data/lib/one_msg_chat_api/models/patch_flows_flow_id_assets200_response.rb +169 -0
- data/lib/one_msg_chat_api/models/profile_info.rb +254 -0
- data/lib/one_msg_chat_api/models/retrieve_media200_response.rb +183 -0
- data/lib/one_msg_chat_api/models/send_address_message_request.rb +273 -0
- data/lib/one_msg_chat_api/models/send_button_request.rb +176 -0
- data/lib/one_msg_chat_api/models/send_button_request_sections_inner.rb +156 -0
- data/lib/one_msg_chat_api/models/send_button_request_sections_inner_reply.rb +156 -0
- data/lib/one_msg_chat_api/models/send_carousel_request1.rb +202 -0
- data/lib/one_msg_chat_api/models/send_contact_request.rb +158 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner.rb +209 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_name.rb +192 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_org.rb +165 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_phones_inner.rb +165 -0
- data/lib/one_msg_chat_api/models/send_cta_url_request.rb +264 -0
- data/lib/one_msg_chat_api/models/send_file_request.rb +278 -0
- data/lib/one_msg_chat_api/models/send_flow_request1.rb +387 -0
- data/lib/one_msg_chat_api/models/send_flow_request1_header.rb +104 -0
- data/lib/one_msg_chat_api/models/send_flow_request_header.rb +105 -0
- data/lib/one_msg_chat_api/models/send_list_request.rb +185 -0
- data/lib/one_msg_chat_api/models/send_list_request_sections_inner.rb +158 -0
- data/lib/one_msg_chat_api/models/send_list_request_sections_inner_rows_inner.rb +165 -0
- data/lib/one_msg_chat_api/models/send_location_request1.rb +235 -0
- data/lib/one_msg_chat_api/models/send_location_request_request.rb +156 -0
- data/lib/one_msg_chat_api/models/send_message_request.rb +284 -0
- data/lib/one_msg_chat_api/models/send_order_details_request.rb +308 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_language.rb +176 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order.rb +220 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner.rb +174 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner_amount.rb +156 -0
- data/lib/one_msg_chat_api/models/send_payment_request_request.rb +245 -0
- data/lib/one_msg_chat_api/models/send_reaction_request.rb +165 -0
- data/lib/one_msg_chat_api/models/send_sticker_request.rb +185 -0
- data/lib/one_msg_chat_api/models/send_template_request.rb +215 -0
- data/lib/one_msg_chat_api/models/send_template_request_language.rb +156 -0
- data/lib/one_msg_chat_api/models/set_whatsapp_business_encryption_request.rb +165 -0
- data/lib/one_msg_chat_api/models/success_response.rb +149 -0
- data/lib/one_msg_chat_api/models/update_me_request.rb +207 -0
- data/lib/one_msg_chat_api/version.rb +15 -0
- data/lib/one_msg_chat_api.rb +111 -0
- data/one_msg_chat_api.gemspec +41 -0
- data/spec/api/calling_api_spec.rb +73 -0
- data/spec/api/catalog_api_spec.rb +60 -0
- data/spec/api/channel_api_spec.rb +72 -0
- data/spec/api/flows_api_spec.rb +175 -0
- data/spec/api/groups_api_spec.rb +117 -0
- data/spec/api/messaging_api_spec.rb +359 -0
- data/spec/api/profile_api_spec.rb +60 -0
- data/spec/api/templates_api_spec.rb +83 -0
- data/spec/api/users_api_spec.rb +71 -0
- data/spec/api/webhooks_api_spec.rb +60 -0
- data/spec/models/add_template_request_spec.rb +54 -0
- data/spec/models/block_user_request_spec.rb +36 -0
- data/spec/models/conversational_automation_commands_inner_spec.rb +42 -0
- data/spec/models/conversational_automation_spec.rb +48 -0
- data/spec/models/create_commerce200_response_spec.rb +36 -0
- data/spec/models/create_commerce_request_params_spec.rb +42 -0
- data/spec/models/create_commerce_request_spec.rb +36 -0
- data/spec/models/create_groups200_response_spec.rb +36 -0
- data/spec/models/create_read_message200_response_spec.rb +36 -0
- data/spec/models/create_read_message401_response_spec.rb +36 -0
- data/spec/models/create_read_message_request_spec.rb +48 -0
- data/spec/models/delete_flows_flow_id200_response_spec.rb +42 -0
- data/spec/models/delete_groups_group_id200_response_spec.rb +42 -0
- data/spec/models/delete_media_legacy_request_spec.rb +36 -0
- data/spec/models/error_response_spec.rb +36 -0
- data/spec/models/get_commerce200_response_inner_spec.rb +48 -0
- data/spec/models/get_mm_lite_status200_response_spec.rb +48 -0
- data/spec/models/get_webhook200_response_spec.rb +36 -0
- data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +52 -0
- data/spec/models/list_blocked_users200_response_spec.rb +36 -0
- data/spec/models/list_flows200_response_spec.rb +60 -0
- data/spec/models/list_messages200_response_spec.rb +42 -0
- data/spec/models/list_templates200_response_spec.rb +48 -0
- data/spec/models/message_sent_response_spec.rb +54 -0
- data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +48 -0
- data/spec/models/profile_info_spec.rb +82 -0
- data/spec/models/retrieve_media200_response_spec.rb +60 -0
- data/spec/models/send_address_message_request_spec.rb +82 -0
- data/spec/models/send_button_request_sections_inner_reply_spec.rb +42 -0
- data/spec/models/send_button_request_sections_inner_spec.rb +42 -0
- data/spec/models/send_button_request_spec.rb +54 -0
- data/spec/models/send_carousel_request1_spec.rb +60 -0
- data/spec/models/send_contact_request_contacts_inner_name_spec.rb +66 -0
- data/spec/models/send_contact_request_contacts_inner_org_spec.rb +48 -0
- data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +48 -0
- data/spec/models/send_contact_request_contacts_inner_spec.rb +72 -0
- data/spec/models/send_contact_request_spec.rb +42 -0
- data/spec/models/send_cta_url_request_spec.rb +78 -0
- data/spec/models/send_file_request_spec.rb +88 -0
- data/spec/models/send_flow_request1_header_spec.rb +32 -0
- data/spec/models/send_flow_request1_spec.rb +128 -0
- data/spec/models/send_flow_request_header_spec.rb +32 -0
- data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +48 -0
- data/spec/models/send_list_request_sections_inner_spec.rb +42 -0
- data/spec/models/send_list_request_spec.rb +60 -0
- data/spec/models/send_location_request1_spec.rb +72 -0
- data/spec/models/send_location_request_request_spec.rb +42 -0
- data/spec/models/send_message_request_spec.rb +54 -0
- data/spec/models/send_order_details_request_language_spec.rb +42 -0
- data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +42 -0
- data/spec/models/send_order_details_request_order_items_inner_spec.rb +54 -0
- data/spec/models/send_order_details_request_order_spec.rb +66 -0
- data/spec/models/send_order_details_request_spec.rb +90 -0
- data/spec/models/send_payment_request_request_spec.rb +64 -0
- data/spec/models/send_reaction_request_spec.rb +48 -0
- data/spec/models/send_sticker_request_spec.rb +60 -0
- data/spec/models/send_template_request_language_spec.rb +42 -0
- data/spec/models/send_template_request_spec.rb +78 -0
- data/spec/models/set_whatsapp_business_encryption_request_spec.rb +36 -0
- data/spec/models/success_response_spec.rb +36 -0
- data/spec/models/update_me_request_spec.rb +72 -0
- data/spec/spec_helper.rb +111 -0
- metadata +408 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'one_msg_chat_api/api_client'
|
|
15
|
+
require 'one_msg_chat_api/api_error'
|
|
16
|
+
require 'one_msg_chat_api/api_model_base'
|
|
17
|
+
require 'one_msg_chat_api/version'
|
|
18
|
+
require 'one_msg_chat_api/configuration'
|
|
19
|
+
|
|
20
|
+
# Models
|
|
21
|
+
require 'one_msg_chat_api/models/add_template_request'
|
|
22
|
+
require 'one_msg_chat_api/models/block_user_request'
|
|
23
|
+
require 'one_msg_chat_api/models/conversational_automation'
|
|
24
|
+
require 'one_msg_chat_api/models/conversational_automation_commands_inner'
|
|
25
|
+
require 'one_msg_chat_api/models/create_commerce200_response'
|
|
26
|
+
require 'one_msg_chat_api/models/create_commerce_request'
|
|
27
|
+
require 'one_msg_chat_api/models/create_commerce_request_params'
|
|
28
|
+
require 'one_msg_chat_api/models/create_groups200_response'
|
|
29
|
+
require 'one_msg_chat_api/models/create_read_message200_response'
|
|
30
|
+
require 'one_msg_chat_api/models/create_read_message401_response'
|
|
31
|
+
require 'one_msg_chat_api/models/create_read_message_request'
|
|
32
|
+
require 'one_msg_chat_api/models/delete_flows_flow_id200_response'
|
|
33
|
+
require 'one_msg_chat_api/models/delete_groups_group_id200_response'
|
|
34
|
+
require 'one_msg_chat_api/models/delete_media_legacy_request'
|
|
35
|
+
require 'one_msg_chat_api/models/error_response'
|
|
36
|
+
require 'one_msg_chat_api/models/get_commerce200_response_inner'
|
|
37
|
+
require 'one_msg_chat_api/models/get_mm_lite_status200_response'
|
|
38
|
+
require 'one_msg_chat_api/models/get_webhook200_response'
|
|
39
|
+
require 'one_msg_chat_api/models/get_whatsapp_business_encryption200_response'
|
|
40
|
+
require 'one_msg_chat_api/models/list_blocked_users200_response'
|
|
41
|
+
require 'one_msg_chat_api/models/list_flows200_response'
|
|
42
|
+
require 'one_msg_chat_api/models/list_messages200_response'
|
|
43
|
+
require 'one_msg_chat_api/models/list_templates200_response'
|
|
44
|
+
require 'one_msg_chat_api/models/message_sent_response'
|
|
45
|
+
require 'one_msg_chat_api/models/patch_flows_flow_id_assets200_response'
|
|
46
|
+
require 'one_msg_chat_api/models/profile_info'
|
|
47
|
+
require 'one_msg_chat_api/models/retrieve_media200_response'
|
|
48
|
+
require 'one_msg_chat_api/models/send_address_message_request'
|
|
49
|
+
require 'one_msg_chat_api/models/send_button_request'
|
|
50
|
+
require 'one_msg_chat_api/models/send_button_request_sections_inner'
|
|
51
|
+
require 'one_msg_chat_api/models/send_button_request_sections_inner_reply'
|
|
52
|
+
require 'one_msg_chat_api/models/send_carousel_request1'
|
|
53
|
+
require 'one_msg_chat_api/models/send_contact_request'
|
|
54
|
+
require 'one_msg_chat_api/models/send_contact_request_contacts_inner'
|
|
55
|
+
require 'one_msg_chat_api/models/send_contact_request_contacts_inner_name'
|
|
56
|
+
require 'one_msg_chat_api/models/send_contact_request_contacts_inner_org'
|
|
57
|
+
require 'one_msg_chat_api/models/send_contact_request_contacts_inner_phones_inner'
|
|
58
|
+
require 'one_msg_chat_api/models/send_cta_url_request'
|
|
59
|
+
require 'one_msg_chat_api/models/send_file_request'
|
|
60
|
+
require 'one_msg_chat_api/models/send_flow_request1'
|
|
61
|
+
require 'one_msg_chat_api/models/send_flow_request1_header'
|
|
62
|
+
require 'one_msg_chat_api/models/send_flow_request_header'
|
|
63
|
+
require 'one_msg_chat_api/models/send_list_request'
|
|
64
|
+
require 'one_msg_chat_api/models/send_list_request_sections_inner'
|
|
65
|
+
require 'one_msg_chat_api/models/send_list_request_sections_inner_rows_inner'
|
|
66
|
+
require 'one_msg_chat_api/models/send_location_request1'
|
|
67
|
+
require 'one_msg_chat_api/models/send_location_request_request'
|
|
68
|
+
require 'one_msg_chat_api/models/send_message_request'
|
|
69
|
+
require 'one_msg_chat_api/models/send_order_details_request'
|
|
70
|
+
require 'one_msg_chat_api/models/send_order_details_request_language'
|
|
71
|
+
require 'one_msg_chat_api/models/send_order_details_request_order'
|
|
72
|
+
require 'one_msg_chat_api/models/send_order_details_request_order_items_inner'
|
|
73
|
+
require 'one_msg_chat_api/models/send_order_details_request_order_items_inner_amount'
|
|
74
|
+
require 'one_msg_chat_api/models/send_payment_request_request'
|
|
75
|
+
require 'one_msg_chat_api/models/send_reaction_request'
|
|
76
|
+
require 'one_msg_chat_api/models/send_sticker_request'
|
|
77
|
+
require 'one_msg_chat_api/models/send_template_request'
|
|
78
|
+
require 'one_msg_chat_api/models/send_template_request_language'
|
|
79
|
+
require 'one_msg_chat_api/models/set_whatsapp_business_encryption_request'
|
|
80
|
+
require 'one_msg_chat_api/models/success_response'
|
|
81
|
+
require 'one_msg_chat_api/models/update_me_request'
|
|
82
|
+
|
|
83
|
+
# APIs
|
|
84
|
+
require 'one_msg_chat_api/api/calling_api'
|
|
85
|
+
require 'one_msg_chat_api/api/catalog_api'
|
|
86
|
+
require 'one_msg_chat_api/api/channel_api'
|
|
87
|
+
require 'one_msg_chat_api/api/flows_api'
|
|
88
|
+
require 'one_msg_chat_api/api/groups_api'
|
|
89
|
+
require 'one_msg_chat_api/api/messaging_api'
|
|
90
|
+
require 'one_msg_chat_api/api/profile_api'
|
|
91
|
+
require 'one_msg_chat_api/api/templates_api'
|
|
92
|
+
require 'one_msg_chat_api/api/users_api'
|
|
93
|
+
require 'one_msg_chat_api/api/webhooks_api'
|
|
94
|
+
|
|
95
|
+
module OneMsgChatApi
|
|
96
|
+
class << self
|
|
97
|
+
# Customize default settings for the SDK using block.
|
|
98
|
+
# OneMsgChatApi.configure do |config|
|
|
99
|
+
# config.username = "xxx"
|
|
100
|
+
# config.password = "xxx"
|
|
101
|
+
# end
|
|
102
|
+
# If no block given, return the default Configuration object.
|
|
103
|
+
def configure
|
|
104
|
+
if block_given?
|
|
105
|
+
yield(Configuration.default)
|
|
106
|
+
else
|
|
107
|
+
Configuration.default
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#1MSG WhatsApp Business API (Public)
|
|
5
|
+
|
|
6
|
+
#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/
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: support@1msg.io
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
Generator version: 7.22.0
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "one_msg_chat_api/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "one_msg_chat_api"
|
|
20
|
+
s.version = OneMsgChatApi::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["1MSG"]
|
|
23
|
+
s.email = ["support@1msg.io"]
|
|
24
|
+
s.homepage = "https://github.com/1msg/1msg-api"
|
|
25
|
+
s.summary = "one_msg_chat_api"
|
|
26
|
+
s.description = "one_msg_chat_api"
|
|
27
|
+
s.license = "MIT"
|
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
|
29
|
+
s.metadata = {}
|
|
30
|
+
|
|
31
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
|
|
32
|
+
s.add_runtime_dependency 'faraday-multipart'
|
|
33
|
+
s.add_runtime_dependency 'marcel'
|
|
34
|
+
|
|
35
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
36
|
+
|
|
37
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
38
|
+
s.test_files = `find spec/*`.split("\n")
|
|
39
|
+
s.executables = []
|
|
40
|
+
s.require_paths = ["lib"]
|
|
41
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneMsgChatApi::CallingApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'CallingApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = OneMsgChatApi::CallingApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of CallingApi' do
|
|
30
|
+
it 'should create an instance of CallingApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(OneMsgChatApi::CallingApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_calling_settings
|
|
36
|
+
# Get calling settings
|
|
37
|
+
# WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
|
|
38
|
+
# @param token JWT token or API key for authorization
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Hash<String, Object>]
|
|
41
|
+
describe 'get_calling_settings test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for initiate_call
|
|
48
|
+
# Initiate WhatsApp call
|
|
49
|
+
# Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
|
|
50
|
+
# @param token JWT token or API key for authorization
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @option opts [Hash<String, Object>] :request_body
|
|
53
|
+
# @return [Hash<String, Object>]
|
|
54
|
+
describe 'initiate_call test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# unit tests for update_calling_settings
|
|
61
|
+
# Update calling settings
|
|
62
|
+
# Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
|
|
63
|
+
# @param token JWT token or API key for authorization
|
|
64
|
+
# @param [Hash] opts the optional parameters
|
|
65
|
+
# @option opts [Hash<String, Object>] :request_body
|
|
66
|
+
# @return [Hash<String, Object>]
|
|
67
|
+
describe 'update_calling_settings test' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneMsgChatApi::CatalogApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'CatalogApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = OneMsgChatApi::CatalogApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of CatalogApi' do
|
|
30
|
+
it 'should create an instance of CatalogApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(OneMsgChatApi::CatalogApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_commerce
|
|
36
|
+
# Set Commerce Settings
|
|
37
|
+
# Update catalog/cart commerce settings via the `params` object. - `params.is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `params.is_cart_enabled` — enable cart (`true`) or disable it (`false`). Blocked when the channel subscription limit is exceeded. Requires a commerce-capable channel (Cloud Functions `/commerceWAV2`).
|
|
38
|
+
# @param token JWT token or API key for authorization
|
|
39
|
+
# @param create_commerce_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [CreateCommerce200Response]
|
|
42
|
+
describe 'create_commerce test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# unit tests for get_commerce
|
|
49
|
+
# Get Commerce Settings
|
|
50
|
+
# Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
|
|
51
|
+
# @param token JWT token or API key for authorization
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [Array<GetCommerce200ResponseInner>]
|
|
54
|
+
describe 'get_commerce test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneMsgChatApi::ChannelApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ChannelApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = OneMsgChatApi::ChannelApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ChannelApi' do
|
|
30
|
+
it 'should create an instance of ChannelApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(OneMsgChatApi::ChannelApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_conversational_automation
|
|
36
|
+
# Get conversational automation settings
|
|
37
|
+
# Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
|
|
38
|
+
# @param token JWT token or API key for authorization
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [ConversationalAutomation]
|
|
41
|
+
describe 'get_conversational_automation test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for get_status
|
|
48
|
+
# Get channel status
|
|
49
|
+
# Returns WhatsApp Business API client connection status.
|
|
50
|
+
# @param token JWT token or API key for authorization
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [Hash<String, Object>]
|
|
53
|
+
describe 'get_status test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for set_conversational_automation
|
|
60
|
+
# Set conversational automation settings
|
|
61
|
+
# Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
|
|
62
|
+
# @param token JWT token or API key for authorization
|
|
63
|
+
# @param conversational_automation
|
|
64
|
+
# @param [Hash] opts the optional parameters
|
|
65
|
+
# @return [Hash<String, Object>]
|
|
66
|
+
describe 'set_conversational_automation test' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneMsgChatApi::FlowsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'FlowsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = OneMsgChatApi::FlowsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of FlowsApi' do
|
|
30
|
+
it 'should create an instance of FlowsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(OneMsgChatApi::FlowsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_flows
|
|
36
|
+
# Create Flow
|
|
37
|
+
# @param token JWT token or API key for authorization
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :waba_account_id
|
|
40
|
+
# @return [CreateGroups200Response]
|
|
41
|
+
describe 'create_flows test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for create_flows_flow_id_deprecate
|
|
48
|
+
# Deprecate Flow
|
|
49
|
+
# @param flow_id Flow ID
|
|
50
|
+
# @param token JWT token or API key for authorization
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @option opts [String] :waba_account_id
|
|
53
|
+
# @return [Hash<String, Object>]
|
|
54
|
+
describe 'create_flows_flow_id_deprecate test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# unit tests for create_flows_flow_id_publish
|
|
61
|
+
# Publish Flow
|
|
62
|
+
# @param flow_id Flow ID
|
|
63
|
+
# @param token JWT token or API key for authorization
|
|
64
|
+
# @param [Hash] opts the optional parameters
|
|
65
|
+
# @option opts [String] :waba_account_id
|
|
66
|
+
# @return [Hash<String, Object>]
|
|
67
|
+
describe 'create_flows_flow_id_publish test' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# unit tests for delete_flows_flow_id
|
|
74
|
+
# Delete Flow
|
|
75
|
+
# @param flow_id Flow ID
|
|
76
|
+
# @param token JWT token or API key for authorization
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @option opts [String] :waba_account_id
|
|
79
|
+
# @return [DeleteFlowsFlowId200Response]
|
|
80
|
+
describe 'delete_flows_flow_id test' do
|
|
81
|
+
it 'should work' do
|
|
82
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# unit tests for get_flows_flow_id
|
|
87
|
+
# Get Flow Details
|
|
88
|
+
# @param flow_id Flow ID
|
|
89
|
+
# @param token JWT token or API key for authorization
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :waba_account_id
|
|
92
|
+
# @return [CreateGroups200Response]
|
|
93
|
+
describe 'get_flows_flow_id test' do
|
|
94
|
+
it 'should work' do
|
|
95
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# unit tests for get_flows_flow_id_preview
|
|
100
|
+
# Preview Flow
|
|
101
|
+
# @param flow_id Flow ID
|
|
102
|
+
# @param token JWT token or API key for authorization
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @option opts [String] :waba_account_id
|
|
105
|
+
# @return [Hash<String, Object>]
|
|
106
|
+
describe 'get_flows_flow_id_preview test' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# unit tests for get_whatsapp_business_encryption
|
|
113
|
+
# Get business encryption public key
|
|
114
|
+
# Retrieve the WhatsApp business public key and signature status for this channel's phone number. Required before publishing or sending Flows that use data encryption.
|
|
115
|
+
# @param token JWT token or API key for authorization
|
|
116
|
+
# @param [Hash] opts the optional parameters
|
|
117
|
+
# @return [GetWhatsappBusinessEncryption200Response]
|
|
118
|
+
describe 'get_whatsapp_business_encryption test' do
|
|
119
|
+
it 'should work' do
|
|
120
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# unit tests for list_flows
|
|
125
|
+
# List Flows
|
|
126
|
+
# @param token JWT token or API key for authorization
|
|
127
|
+
# @param [Hash] opts the optional parameters
|
|
128
|
+
# @option opts [String] :waba_account_id
|
|
129
|
+
# @return [ListFlows200Response]
|
|
130
|
+
describe 'list_flows test' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# unit tests for patch_flows_flow_id_assets
|
|
137
|
+
# Update Flow Structure
|
|
138
|
+
# @param flow_id Flow ID
|
|
139
|
+
# @param token JWT token or API key for authorization
|
|
140
|
+
# @param [Hash] opts the optional parameters
|
|
141
|
+
# @option opts [String] :waba_account_id
|
|
142
|
+
# @return [PatchFlowsFlowIdAssets200Response]
|
|
143
|
+
describe 'patch_flows_flow_id_assets test' do
|
|
144
|
+
it 'should work' do
|
|
145
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# unit tests for patch_flows_flow_id_metadata
|
|
150
|
+
# Update Flow Metadata
|
|
151
|
+
# @param flow_id Flow ID
|
|
152
|
+
# @param token JWT token or API key for authorization
|
|
153
|
+
# @param [Hash] opts the optional parameters
|
|
154
|
+
# @option opts [String] :waba_account_id
|
|
155
|
+
# @return [Hash<String, Object>]
|
|
156
|
+
describe 'patch_flows_flow_id_metadata test' do
|
|
157
|
+
it 'should work' do
|
|
158
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# unit tests for set_whatsapp_business_encryption
|
|
163
|
+
# Set business encryption public key
|
|
164
|
+
# Upload and sign a 2048-bit RSA business public key (PEM) for this channel's phone number. Meta requires a signed key before Flow publish/send. Only one active key per number; a new upload replaces the previous key.
|
|
165
|
+
# @param token JWT token or API key for authorization
|
|
166
|
+
# @param set_whatsapp_business_encryption_request
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @return [CreateCommerce200Response]
|
|
169
|
+
describe 'set_whatsapp_business_encryption test' do
|
|
170
|
+
it 'should work' do
|
|
171
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#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/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for OneMsgChatApi::GroupsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'GroupsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = OneMsgChatApi::GroupsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of GroupsApi' do
|
|
30
|
+
it 'should create an instance of GroupsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(OneMsgChatApi::GroupsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_groups
|
|
36
|
+
# Create Group
|
|
37
|
+
# @param token JWT token or API key for authorization
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [CreateGroups200Response]
|
|
40
|
+
describe 'create_groups test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for create_groups_group_id
|
|
47
|
+
# Update Group Info
|
|
48
|
+
# @param group_id
|
|
49
|
+
# @param token JWT token or API key for authorization
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @return [Hash<String, Object>]
|
|
52
|
+
describe 'create_groups_group_id test' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# unit tests for create_groups_group_id_invitelink
|
|
59
|
+
# Reset Invite Link
|
|
60
|
+
# @param group_id
|
|
61
|
+
# @param token JWT token or API key for authorization
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @return [Hash<String, Object>]
|
|
64
|
+
describe 'create_groups_group_id_invitelink test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# unit tests for delete_groups_group_id
|
|
71
|
+
# Delete Group
|
|
72
|
+
# @param group_id
|
|
73
|
+
# @param token JWT token or API key for authorization
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @return [DeleteGroupsGroupId200Response]
|
|
76
|
+
describe 'delete_groups_group_id test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# unit tests for get_groups_group_id
|
|
83
|
+
# Get Group Info
|
|
84
|
+
# @param group_id
|
|
85
|
+
# @param token JWT token or API key for authorization
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Hash<String, Object>]
|
|
88
|
+
describe 'get_groups_group_id test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for get_groups_group_id_invitelink
|
|
95
|
+
# Get Invite Link
|
|
96
|
+
# @param group_id
|
|
97
|
+
# @param token JWT token or API key for authorization
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Hash<String, Object>]
|
|
100
|
+
describe 'get_groups_group_id_invitelink test' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# unit tests for list_groups
|
|
107
|
+
# Get Groups List
|
|
108
|
+
# @param token JWT token or API key for authorization
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Hash<String, Object>]
|
|
111
|
+
describe 'list_groups test' do
|
|
112
|
+
it 'should work' do
|
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
end
|