one_msg_sdk 2.0.2 → 2.0.3
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 +4 -4
- data/AGENTS.md +62 -16
- data/README.md +97 -29
- data/docs/AddTemplate200Response.md +18 -0
- data/docs/AddTemplateRequest.md +7 -7
- data/docs/CallingApi.md +1 -1
- data/docs/CatalogApi.md +1 -1
- data/docs/ChannelApi.md +151 -5
- data/docs/CreateFlowsRequest.md +26 -0
- data/docs/CreateGroupsGroupIdRequest.md +22 -0
- data/docs/CreateGroupsRequest.md +20 -0
- data/docs/CreateSettingsRequest.md +28 -0
- data/docs/CreateSettingsRequestWebhookUrl.md +49 -0
- data/docs/CreateUploadMedia200Response.md +18 -0
- data/docs/CreateUploadMediaRequest.md +20 -0
- data/docs/FlowsApi.md +32 -16
- data/docs/GetStatus200Response.md +26 -0
- data/docs/GetWebhook200Response.md +24 -2
- data/docs/GetWebhook200ResponseWebhookUrl.md +49 -0
- data/docs/GroupsApi.md +38 -18
- data/docs/ListSettings200Response.md +52 -0
- data/docs/ListSettings200ResponseWebhookUrl.md +49 -0
- data/docs/MessagingApi.md +140 -35
- data/docs/PatchFlowsFlowIdAssetsRequest.md +18 -0
- data/docs/PatchFlowsFlowIdMetadataRequest.md +22 -0
- data/docs/ProfileApi.md +9 -11
- data/docs/RemoveTemplateRequest.md +18 -0
- data/docs/SendButtonRequest.md +9 -1
- data/docs/SendCarouselRequest1.md +4 -2
- data/docs/SendContactInfoRequest.md +26 -0
- data/docs/SendContactRequest.md +7 -1
- data/docs/SendContactRequestContact.md +26 -0
- data/docs/SendContactRequestContactName.md +49 -0
- data/docs/SendContactRequestContactsInner.md +3 -3
- data/docs/SendContactRequestContactsInnerPhonesInner.md +1 -1
- data/docs/SendListRequest.md +5 -1
- data/docs/SendLocationRequestRequest.md +5 -1
- data/docs/SendMessageRequest.md +6 -2
- data/docs/SendMessageRequestDirectSend.md +20 -0
- data/docs/SendProductRequest.md +30 -0
- data/docs/SendReactionRequest.md +3 -1
- data/docs/SendTemplateRequest.md +9 -5
- data/docs/SendTemplateRequestLanguage.md +3 -3
- data/docs/SetWebhook200Response.md +20 -0
- data/docs/SetWebhook200ResponseWebhookUrl.md +49 -0
- data/docs/SetWebhookRequest.md +18 -0
- data/docs/SetWebhookRequestWebhookUrl.md +49 -0
- data/docs/TemplatesApi.md +29 -17
- data/docs/UpdateMe200Response.md +18 -0
- data/docs/UpdateMeRequest.md +6 -6
- data/docs/WebhookUrlStatus.md +34 -0
- data/docs/WebhooksApi.md +10 -12
- data/lib/one_msg_sdk/api/calling_api.rb +4 -4
- data/lib/one_msg_sdk/api/catalog_api.rb +4 -4
- data/lib/one_msg_sdk/api/channel_api.rb +146 -7
- data/lib/one_msg_sdk/api/flows_api.rb +58 -14
- data/lib/one_msg_sdk/api/groups_api.rb +48 -10
- data/lib/one_msg_sdk/api/messaging_api.rb +163 -38
- data/lib/one_msg_sdk/api/profile_api.rb +17 -13
- data/lib/one_msg_sdk/api/templates_api.rb +36 -13
- data/lib/one_msg_sdk/api/users_api.rb +2 -2
- data/lib/one_msg_sdk/api/webhooks_api.rb +19 -15
- data/lib/one_msg_sdk/api_client.rb +2 -2
- data/lib/one_msg_sdk/api_error.rb +2 -2
- data/lib/one_msg_sdk/api_model_base.rb +2 -2
- data/lib/one_msg_sdk/configuration.rb +2 -2
- data/lib/one_msg_sdk/models/add_template200_response.rb +150 -0
- data/lib/one_msg_sdk/models/add_template_request.rb +6 -2
- data/lib/one_msg_sdk/models/block_user_request.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +2 -2
- data/lib/one_msg_sdk/models/conversational_automation.rb +2 -2
- data/lib/one_msg_sdk/models/conversational_automation_commands_inner.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce_request.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce_request_params.rb +2 -2
- data/lib/one_msg_sdk/models/create_flows_request.rb +238 -0
- data/lib/one_msg_sdk/models/create_groups200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_groups_group_id_request.rb +168 -0
- data/lib/one_msg_sdk/models/create_groups_request.rb +175 -0
- data/lib/one_msg_sdk/models/create_read_message200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_read_message401_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_read_message_request.rb +2 -2
- data/lib/one_msg_sdk/models/create_settings_request.rb +192 -0
- data/lib/one_msg_sdk/models/create_settings_request_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/create_upload_media200_response.rb +147 -0
- data/lib/one_msg_sdk/models/create_upload_media_request.rb +158 -0
- data/lib/one_msg_sdk/models/delete_flows_flow_id200_response.rb +2 -2
- data/lib/one_msg_sdk/models/delete_groups_group_id200_response.rb +2 -2
- data/lib/one_msg_sdk/models/delete_media_legacy_request.rb +2 -2
- data/lib/one_msg_sdk/models/error_response.rb +2 -2
- data/lib/one_msg_sdk/models/get_commerce200_response_inner.rb +2 -2
- data/lib/one_msg_sdk/models/get_mm_lite_status200_response.rb +2 -2
- data/lib/one_msg_sdk/models/get_status200_response.rb +185 -0
- data/lib/one_msg_sdk/models/get_webhook200_response.rb +155 -6
- data/lib/one_msg_sdk/models/get_webhook200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/get_whatsapp_business_encryption200_response.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_request.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_request_session.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_response.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_response_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_blocked_users200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_flows200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_messages200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_settings200_response.rb +352 -0
- data/lib/one_msg_sdk/models/list_settings200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/list_templates200_response.rb +2 -2
- data/lib/one_msg_sdk/models/message_sent_response.rb +2 -2
- data/lib/one_msg_sdk/models/patch_flows_flow_id_assets200_response.rb +2 -2
- data/lib/one_msg_sdk/models/patch_flows_flow_id_assets_request.rb +167 -0
- data/lib/one_msg_sdk/models/patch_flows_flow_id_metadata_request.rb +190 -0
- data/lib/one_msg_sdk/models/profile_info.rb +2 -2
- data/lib/one_msg_sdk/models/remove_template_request.rb +165 -0
- data/lib/one_msg_sdk/models/retrieve_media200_response.rb +2 -2
- data/lib/one_msg_sdk/models/send_address_message_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_button_request.rb +48 -3
- data/lib/one_msg_sdk/models/send_button_request_sections_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_button_request_sections_inner_reply.rb +2 -2
- data/lib/one_msg_sdk/models/send_carousel_request1.rb +38 -13
- data/lib/one_msg_sdk/models/send_contact_info_request.rb +222 -0
- data/lib/one_msg_sdk/models/send_contact_request.rb +32 -3
- data/lib/one_msg_sdk/models/send_contact_request_contact.rb +221 -0
- data/lib/one_msg_sdk/models/send_contact_request_contact_name.rb +105 -0
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner.rb +5 -5
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_name.rb +2 -2
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_org.rb +2 -2
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.rb +3 -2
- data/lib/one_msg_sdk/models/send_cta_url_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_file_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request1.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request1_header.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request_header.rb +2 -2
- data/lib/one_msg_sdk/models/send_list_request.rb +23 -3
- data/lib/one_msg_sdk/models/send_list_request_sections_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_location_request1.rb +2 -2
- data/lib/one_msg_sdk/models/send_location_request_request.rb +23 -3
- data/lib/one_msg_sdk/models/send_message_request.rb +60 -28
- data/lib/one_msg_sdk/models/send_message_request_direct_send.rb +189 -0
- data/lib/one_msg_sdk/models/send_order_details_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_language.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.rb +2 -2
- data/lib/one_msg_sdk/models/send_payment_request_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_product_request.rb +225 -0
- data/lib/one_msg_sdk/models/send_reaction_request.rb +14 -3
- data/lib/one_msg_sdk/models/send_sticker_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_template_request.rb +29 -5
- data/lib/one_msg_sdk/models/send_template_request_language.rb +6 -2
- data/lib/one_msg_sdk/models/set_webhook200_response.rb +157 -0
- data/lib/one_msg_sdk/models/set_webhook200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/set_webhook_request.rb +164 -0
- data/lib/one_msg_sdk/models/set_webhook_request_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/set_whatsapp_business_encryption_request.rb +2 -2
- data/lib/one_msg_sdk/models/success_response.rb +2 -2
- data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +2 -2
- data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +2 -2
- data/lib/one_msg_sdk/models/update_me200_response.rb +147 -0
- data/lib/one_msg_sdk/models/update_me_request.rb +6 -3
- data/lib/one_msg_sdk/models/webhook_url_status.rb +287 -0
- data/lib/one_msg_sdk/platform_client.rb +182 -0
- data/lib/one_msg_sdk/version.rb +3 -3
- data/lib/one_msg_sdk.rb +30 -2
- data/one_msg_sdk.gemspec +2 -2
- data/spec/api/calling_api_spec.rb +3 -3
- data/spec/api/catalog_api_spec.rb +3 -3
- data/spec/api/channel_api_spec.rb +29 -4
- data/spec/api/flows_api_spec.rb +10 -2
- data/spec/api/groups_api_spec.rb +10 -2
- data/spec/api/messaging_api_spec.rb +37 -9
- data/spec/api/profile_api_spec.rb +5 -5
- data/spec/api/templates_api_spec.rb +11 -5
- data/spec/api/users_api_spec.rb +2 -2
- data/spec/api/webhooks_api_spec.rb +6 -6
- data/spec/models/add_template200_response_spec.rb +36 -0
- data/spec/models/add_template_request_spec.rb +2 -2
- data/spec/models/block_user_request_spec.rb +2 -2
- data/spec/models/calling_settings_calling_audio_spec.rb +2 -2
- data/spec/models/calling_settings_calling_call_hours_spec.rb +2 -2
- data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +2 -2
- data/spec/models/calling_settings_calling_sip_spec.rb +2 -2
- data/spec/models/calling_settings_calling_spec.rb +2 -2
- data/spec/models/calling_settings_calling_video_spec.rb +2 -2
- data/spec/models/calling_settings_spec.rb +2 -2
- data/spec/models/conversational_automation_commands_inner_spec.rb +2 -2
- data/spec/models/conversational_automation_spec.rb +2 -2
- data/spec/models/create_commerce200_response_spec.rb +2 -2
- data/spec/models/create_commerce_request_params_spec.rb +2 -2
- data/spec/models/create_commerce_request_spec.rb +2 -2
- data/spec/models/create_flows_request_spec.rb +64 -0
- data/spec/models/create_groups200_response_spec.rb +2 -2
- data/spec/models/create_groups_group_id_request_spec.rb +48 -0
- data/spec/models/create_groups_request_spec.rb +42 -0
- data/spec/models/create_read_message200_response_spec.rb +2 -2
- data/spec/models/create_read_message401_response_spec.rb +2 -2
- data/spec/models/create_read_message_request_spec.rb +2 -2
- data/spec/models/create_settings_request_spec.rb +66 -0
- data/spec/models/create_settings_request_webhook_url_spec.rb +32 -0
- data/spec/models/create_upload_media200_response_spec.rb +36 -0
- data/spec/models/create_upload_media_request_spec.rb +42 -0
- data/spec/models/delete_flows_flow_id200_response_spec.rb +2 -2
- data/spec/models/delete_groups_group_id200_response_spec.rb +2 -2
- data/spec/models/delete_media_legacy_request_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +2 -2
- data/spec/models/get_commerce200_response_inner_spec.rb +2 -2
- data/spec/models/get_mm_lite_status200_response_spec.rb +2 -2
- data/spec/models/get_status200_response_spec.rb +60 -0
- data/spec/models/get_webhook200_response_spec.rb +72 -2
- data/spec/models/get_webhook200_response_webhook_url_spec.rb +32 -0
- data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +2 -2
- data/spec/models/initiate_call_request_session_spec.rb +2 -2
- data/spec/models/initiate_call_request_spec.rb +2 -2
- data/spec/models/initiate_call_response_calls_inner_spec.rb +2 -2
- data/spec/models/initiate_call_response_response_spec.rb +2 -2
- data/spec/models/initiate_call_response_spec.rb +2 -2
- data/spec/models/list_blocked_users200_response_spec.rb +2 -2
- data/spec/models/list_flows200_response_spec.rb +2 -2
- data/spec/models/list_messages200_response_spec.rb +2 -2
- data/spec/models/list_settings200_response_spec.rb +142 -0
- data/spec/models/list_settings200_response_webhook_url_spec.rb +32 -0
- data/spec/models/list_templates200_response_spec.rb +2 -2
- data/spec/models/message_sent_response_spec.rb +2 -2
- data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +2 -2
- data/spec/models/patch_flows_flow_id_assets_request_spec.rb +36 -0
- data/spec/models/patch_flows_flow_id_metadata_request_spec.rb +52 -0
- data/spec/models/profile_info_spec.rb +2 -2
- data/spec/models/remove_template_request_spec.rb +36 -0
- data/spec/models/retrieve_media200_response_spec.rb +2 -2
- data/spec/models/send_address_message_request_spec.rb +2 -2
- data/spec/models/send_button_request_sections_inner_reply_spec.rb +2 -2
- data/spec/models/send_button_request_sections_inner_spec.rb +2 -2
- data/spec/models/send_button_request_spec.rb +26 -2
- data/spec/models/send_carousel_request1_spec.rb +8 -2
- data/spec/models/send_contact_info_request_spec.rb +60 -0
- data/spec/models/send_contact_request_contact_name_spec.rb +32 -0
- data/spec/models/send_contact_request_contact_spec.rb +60 -0
- data/spec/models/send_contact_request_contacts_inner_name_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_org_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_spec.rb +2 -2
- data/spec/models/send_contact_request_spec.rb +20 -2
- data/spec/models/send_cta_url_request_spec.rb +2 -2
- data/spec/models/send_file_request_spec.rb +2 -2
- data/spec/models/send_flow_request1_header_spec.rb +2 -2
- data/spec/models/send_flow_request1_spec.rb +2 -2
- data/spec/models/send_flow_request_header_spec.rb +2 -2
- data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +2 -2
- data/spec/models/send_list_request_sections_inner_spec.rb +2 -2
- data/spec/models/send_list_request_spec.rb +14 -2
- data/spec/models/send_location_request1_spec.rb +2 -2
- data/spec/models/send_location_request_request_spec.rb +14 -2
- data/spec/models/send_message_request_direct_send_spec.rb +42 -0
- data/spec/models/send_message_request_spec.rb +18 -2
- data/spec/models/send_order_details_request_language_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_items_inner_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_spec.rb +2 -2
- data/spec/models/send_order_details_request_spec.rb +2 -2
- data/spec/models/send_payment_request_request_spec.rb +2 -2
- data/spec/models/send_product_request_spec.rb +72 -0
- data/spec/models/send_reaction_request_spec.rb +8 -2
- data/spec/models/send_sticker_request_spec.rb +2 -2
- data/spec/models/send_template_request_language_spec.rb +2 -2
- data/spec/models/send_template_request_spec.rb +14 -2
- data/spec/models/set_webhook200_response_spec.rb +42 -0
- data/spec/models/set_webhook200_response_webhook_url_spec.rb +32 -0
- data/spec/models/set_webhook_request_spec.rb +36 -0
- data/spec/models/set_webhook_request_webhook_url_spec.rb +32 -0
- data/spec/models/set_whatsapp_business_encryption_request_spec.rb +2 -2
- data/spec/models/success_response_spec.rb +2 -2
- data/spec/models/update_calling_settings200_response_response_spec.rb +2 -2
- data/spec/models/update_calling_settings200_response_spec.rb +2 -2
- data/spec/models/update_me200_response_spec.rb +36 -0
- data/spec/models/update_me_request_spec.rb +2 -2
- data/spec/models/webhook_url_status_spec.rb +88 -0
- data/spec/spec_helper.rb +2 -2
- metadata +204 -31
|
@@ -0,0 +1,221 @@
|
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **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: 2.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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OneMsgSdk
|
|
17
|
+
# Simple contact card. Use this or `contacts`.
|
|
18
|
+
class SendContactRequestContact < ApiModelBase
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Contact phone in E.164 (`+79181976551`), not a timestamp
|
|
22
|
+
attr_accessor :phone
|
|
23
|
+
|
|
24
|
+
attr_accessor :email
|
|
25
|
+
|
|
26
|
+
attr_accessor :org
|
|
27
|
+
|
|
28
|
+
attr_accessor :url
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'name' => :'name',
|
|
34
|
+
:'phone' => :'phone',
|
|
35
|
+
:'email' => :'email',
|
|
36
|
+
:'org' => :'org',
|
|
37
|
+
:'url' => :'url'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'name' => :'SendContactRequestContactName',
|
|
55
|
+
:'phone' => :'String',
|
|
56
|
+
:'email' => :'String',
|
|
57
|
+
:'org' => :'Hash<String, Object>',
|
|
58
|
+
:'url' => :'String'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# List of attributes with nullable: true
|
|
63
|
+
def self.openapi_nullable
|
|
64
|
+
Set.new([
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::SendContactRequestContact` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::SendContactRequestContact`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'name')
|
|
85
|
+
self.name = attributes[:'name']
|
|
86
|
+
else
|
|
87
|
+
self.name = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'phone')
|
|
91
|
+
self.phone = attributes[:'phone']
|
|
92
|
+
else
|
|
93
|
+
self.phone = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'email')
|
|
97
|
+
self.email = attributes[:'email']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'org')
|
|
101
|
+
if (value = attributes[:'org']).is_a?(Hash)
|
|
102
|
+
self.org = value
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'url')
|
|
107
|
+
self.url = attributes[:'url']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if @name.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @phone.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "phone", phone cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
return false if @name.nil?
|
|
132
|
+
return false if @phone.nil?
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] name Value to be assigned
|
|
138
|
+
def name=(name)
|
|
139
|
+
if name.nil?
|
|
140
|
+
fail ArgumentError, 'name cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@name = name
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] phone Value to be assigned
|
|
148
|
+
def phone=(phone)
|
|
149
|
+
if phone.nil?
|
|
150
|
+
fail ArgumentError, 'phone cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@phone = phone
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
name == o.name &&
|
|
162
|
+
phone == o.phone &&
|
|
163
|
+
email == o.email &&
|
|
164
|
+
org == o.org &&
|
|
165
|
+
url == o.url
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# @see the `==` method
|
|
169
|
+
# @param [Object] Object to be compared
|
|
170
|
+
def eql?(o)
|
|
171
|
+
self == o
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Calculates hash code according to all attributes.
|
|
175
|
+
# @return [Integer] Hash code
|
|
176
|
+
def hash
|
|
177
|
+
[name, phone, email, org, url].hash
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def self.build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
186
|
+
transformed_hash = {}
|
|
187
|
+
openapi_types.each_pair do |key, type|
|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = nil
|
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
new(transformed_hash)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **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: 2.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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OneMsgSdk
|
|
17
|
+
# Display name (string) or Cloud API name object
|
|
18
|
+
module SendContactRequestContactName
|
|
19
|
+
class << self
|
|
20
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
21
|
+
def openapi_one_of
|
|
22
|
+
[
|
|
23
|
+
:'Hash<String, Object>',
|
|
24
|
+
:'String'
|
|
25
|
+
]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Builds the object
|
|
29
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
30
|
+
# @return [Object] Returns the model or the data itself
|
|
31
|
+
def build(data)
|
|
32
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
33
|
+
# Note:
|
|
34
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
35
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
36
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
37
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
38
|
+
# - TODO: logging when debugging is set.
|
|
39
|
+
openapi_one_of.each do |klass|
|
|
40
|
+
begin
|
|
41
|
+
next if klass == :AnyType # "nullable: true"
|
|
42
|
+
return find_and_cast_into_type(klass, data)
|
|
43
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
openapi_one_of.include?(:AnyType) ? data : nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
private
|
|
51
|
+
|
|
52
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
53
|
+
|
|
54
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
55
|
+
def find_and_cast_into_type(klass, data)
|
|
56
|
+
return if data.nil?
|
|
57
|
+
|
|
58
|
+
case klass.to_s
|
|
59
|
+
when 'Boolean'
|
|
60
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
61
|
+
when 'Float'
|
|
62
|
+
return data if data.instance_of?(Float)
|
|
63
|
+
when 'Integer'
|
|
64
|
+
return data if data.instance_of?(Integer)
|
|
65
|
+
when 'Time'
|
|
66
|
+
return Time.parse(data)
|
|
67
|
+
when 'Date'
|
|
68
|
+
return Date.iso8601(data)
|
|
69
|
+
when 'String'
|
|
70
|
+
return data if data.instance_of?(String)
|
|
71
|
+
when 'Object' # "type: object"
|
|
72
|
+
return data if data.instance_of?(Hash)
|
|
73
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
74
|
+
if data.instance_of?(Array)
|
|
75
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
76
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
77
|
+
end
|
|
78
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
79
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
80
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
81
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
82
|
+
end
|
|
83
|
+
else # model
|
|
84
|
+
const = OneMsgSdk.const_get(klass)
|
|
85
|
+
if const
|
|
86
|
+
if const.respond_to?(:openapi_one_of) # nested oneOf model
|
|
87
|
+
model = const.build(data)
|
|
88
|
+
return model if model
|
|
89
|
+
else
|
|
90
|
+
# raise if data contains keys that are not known to the model
|
|
91
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
92
|
+
model = const.build_from_hash(data)
|
|
93
|
+
return model if model
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
raise # if no match by now, raise
|
|
99
|
+
rescue
|
|
100
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -57,11 +57,11 @@ module OneMsgSdk
|
|
|
57
57
|
{
|
|
58
58
|
:'name' => :'SendContactRequestContactsInnerName',
|
|
59
59
|
:'birthday' => :'String',
|
|
60
|
-
:'addresses' => :'Array<Object
|
|
61
|
-
:'emails' => :'Array<Object
|
|
60
|
+
:'addresses' => :'Array<Hash<String, Object>>',
|
|
61
|
+
:'emails' => :'Array<Hash<String, Object>>',
|
|
62
62
|
:'org' => :'SendContactRequestContactsInnerOrg',
|
|
63
63
|
:'phones' => :'Array<SendContactRequestContactsInnerPhonesInner>',
|
|
64
|
-
:'urls' => :'Array<Object
|
|
64
|
+
:'urls' => :'Array<Hash<String, Object>>'
|
|
65
65
|
}
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module OneMsgSdk
|
|
17
17
|
class SendContactRequestContactsInnerPhonesInner < ApiModelBase
|
|
18
|
+
# E.164 phone (`+79181976551`). Not a timestamp.
|
|
18
19
|
attr_accessor :phone
|
|
19
20
|
|
|
20
21
|
attr_accessor :type
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -15,8 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module OneMsgSdk
|
|
17
17
|
class SendListRequest < ApiModelBase
|
|
18
|
+
# Recipient phone with country code. Use phone or chatId.
|
|
18
19
|
attr_accessor :phone
|
|
19
20
|
|
|
21
|
+
# Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId.
|
|
22
|
+
attr_accessor :chat_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :quoted_msg_id
|
|
25
|
+
|
|
20
26
|
attr_accessor :body
|
|
21
27
|
|
|
22
28
|
attr_accessor :button_text
|
|
@@ -29,6 +35,8 @@ module OneMsgSdk
|
|
|
29
35
|
def self.attribute_map
|
|
30
36
|
{
|
|
31
37
|
:'phone' => :'phone',
|
|
38
|
+
:'chat_id' => :'chatId',
|
|
39
|
+
:'quoted_msg_id' => :'quotedMsgId',
|
|
32
40
|
:'body' => :'body',
|
|
33
41
|
:'button_text' => :'buttonText',
|
|
34
42
|
:'action' => :'action',
|
|
@@ -50,6 +58,8 @@ module OneMsgSdk
|
|
|
50
58
|
def self.openapi_types
|
|
51
59
|
{
|
|
52
60
|
:'phone' => :'String',
|
|
61
|
+
:'chat_id' => :'String',
|
|
62
|
+
:'quoted_msg_id' => :'String',
|
|
53
63
|
:'body' => :'String',
|
|
54
64
|
:'button_text' => :'String',
|
|
55
65
|
:'action' => :'String',
|
|
@@ -83,6 +93,14 @@ module OneMsgSdk
|
|
|
83
93
|
self.phone = attributes[:'phone']
|
|
84
94
|
end
|
|
85
95
|
|
|
96
|
+
if attributes.key?(:'chat_id')
|
|
97
|
+
self.chat_id = attributes[:'chat_id']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'quoted_msg_id')
|
|
101
|
+
self.quoted_msg_id = attributes[:'quoted_msg_id']
|
|
102
|
+
end
|
|
103
|
+
|
|
86
104
|
if attributes.key?(:'body')
|
|
87
105
|
self.body = attributes[:'body']
|
|
88
106
|
end
|
|
@@ -123,6 +141,8 @@ module OneMsgSdk
|
|
|
123
141
|
return true if self.equal?(o)
|
|
124
142
|
self.class == o.class &&
|
|
125
143
|
phone == o.phone &&
|
|
144
|
+
chat_id == o.chat_id &&
|
|
145
|
+
quoted_msg_id == o.quoted_msg_id &&
|
|
126
146
|
body == o.body &&
|
|
127
147
|
button_text == o.button_text &&
|
|
128
148
|
action == o.action &&
|
|
@@ -138,7 +158,7 @@ module OneMsgSdk
|
|
|
138
158
|
# Calculates hash code according to all attributes.
|
|
139
159
|
# @return [Integer] Hash code
|
|
140
160
|
def hash
|
|
141
|
-
[phone, body, button_text, action, sections].hash
|
|
161
|
+
[phone, chat_id, quoted_msg_id, body, button_text, action, sections].hash
|
|
142
162
|
end
|
|
143
163
|
|
|
144
164
|
# Builds the object from hash
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
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:**
|
|
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:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|