late-sdk 0.0.84 → 0.0.85
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/README.md +29 -0
- data/docs/AddWhatsAppGroupParticipantsRequest.md +18 -0
- data/docs/ApproveWhatsAppGroupJoinRequestsRequest.md +18 -0
- data/docs/CreateWhatsAppGroupChat201Response.md +20 -0
- data/docs/CreateWhatsAppGroupChat201ResponseGroup.md +20 -0
- data/docs/CreateWhatsAppGroupChatRequest.md +24 -0
- data/docs/CreateWhatsAppGroupInviteLink200Response.md +20 -0
- data/docs/GetWhatsAppGroupChat200Response.md +20 -0
- data/docs/GetWhatsAppGroupChat200ResponseGroup.md +32 -0
- data/docs/GetWhatsAppGroupChat200ResponseGroupParticipantsInner.md +20 -0
- data/docs/ListWhatsAppGroupChats200Response.md +20 -0
- data/docs/ListWhatsAppGroupChats200ResponseGroupsInner.md +22 -0
- data/docs/ListWhatsAppGroupChats200ResponsePaging.md +18 -0
- data/docs/ListWhatsAppGroupChats200ResponsePagingCursors.md +20 -0
- data/docs/ListWhatsAppGroupJoinRequests200Response.md +20 -0
- data/docs/ListWhatsAppGroupJoinRequests200ResponseJoinRequestsInner.md +20 -0
- data/docs/RejectWhatsAppGroupJoinRequestsRequest.md +18 -0
- data/docs/RemoveWhatsAppGroupParticipantsRequest.md +18 -0
- data/docs/UpdateWhatsAppGroupChatRequest.md +22 -0
- data/docs/WhatsAppApi.md +958 -154
- data/lib/late-sdk/api/whats_app_api.rb +945 -118
- data/lib/late-sdk/models/add_whats_app_group_participants_request.rb +176 -0
- data/lib/late-sdk/models/approve_whats_app_group_join_requests_request.rb +167 -0
- data/lib/late-sdk/models/create_whats_app_group_chat201_response.rb +156 -0
- data/lib/late-sdk/models/create_whats_app_group_chat201_response_group.rb +156 -0
- data/lib/late-sdk/models/create_whats_app_group_chat_request.rb +274 -0
- data/lib/late-sdk/models/create_whats_app_group_invite_link200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response_group.rb +213 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response_group_participants_inner.rb +157 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response.rb +158 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_groups_inner.rb +168 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging.rb +147 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging_cursors.rb +156 -0
- data/lib/late-sdk/models/list_whats_app_group_join_requests200_response.rb +158 -0
- data/lib/late-sdk/models/list_whats_app_group_join_requests200_response_join_requests_inner.rb +158 -0
- data/lib/late-sdk/models/reject_whats_app_group_join_requests_request.rb +167 -0
- data/lib/late-sdk/models/remove_whats_app_group_participants_request.rb +167 -0
- data/lib/late-sdk/models/update_whats_app_group_chat_request.rb +237 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +18 -0
- data/openapi.yaml +371 -0
- data/spec/api/whats_app_api_spec.rb +148 -0
- data/spec/models/add_whats_app_group_participants_request_spec.rb +36 -0
- data/spec/models/approve_whats_app_group_join_requests_request_spec.rb +36 -0
- data/spec/models/create_whats_app_group_chat201_response_group_spec.rb +42 -0
- data/spec/models/create_whats_app_group_chat201_response_spec.rb +42 -0
- data/spec/models/create_whats_app_group_chat_request_spec.rb +58 -0
- data/spec/models/create_whats_app_group_invite_link200_response_spec.rb +42 -0
- data/spec/models/get_whats_app_group_chat200_response_group_participants_inner_spec.rb +42 -0
- data/spec/models/get_whats_app_group_chat200_response_group_spec.rb +78 -0
- data/spec/models/get_whats_app_group_chat200_response_spec.rb +42 -0
- data/spec/models/list_whats_app_group_chats200_response_groups_inner_spec.rb +48 -0
- data/spec/models/list_whats_app_group_chats200_response_paging_cursors_spec.rb +42 -0
- data/spec/models/list_whats_app_group_chats200_response_paging_spec.rb +36 -0
- data/spec/models/list_whats_app_group_chats200_response_spec.rb +42 -0
- data/spec/models/list_whats_app_group_join_requests200_response_join_requests_inner_spec.rb +42 -0
- data/spec/models/list_whats_app_group_join_requests200_response_spec.rb +42 -0
- data/spec/models/reject_whats_app_group_join_requests_request_spec.rb +36 -0
- data/spec/models/remove_whats_app_group_participants_request_spec.rb +36 -0
- data/spec/models/update_whats_app_group_chat_request_spec.rb +52 -0
- data/zernio-sdk-0.0.85.gem +0 -0
- metadata +74 -2
- data/zernio-sdk-0.0.84.gem +0 -0
|
@@ -93,6 +93,168 @@ module Late
|
|
|
93
93
|
return data, status_code, headers
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
# Add participants
|
|
97
|
+
# Add participants to a WhatsApp group. Maximum 8 participants per request.
|
|
98
|
+
# @param group_id [String] Group ID
|
|
99
|
+
# @param account_id [String] WhatsApp social account ID
|
|
100
|
+
# @param add_whats_app_group_participants_request [AddWhatsAppGroupParticipantsRequest]
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [UnpublishPost200Response]
|
|
103
|
+
def add_whats_app_group_participants(group_id, account_id, add_whats_app_group_participants_request, opts = {})
|
|
104
|
+
data, _status_code, _headers = add_whats_app_group_participants_with_http_info(group_id, account_id, add_whats_app_group_participants_request, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Add participants
|
|
109
|
+
# Add participants to a WhatsApp group. Maximum 8 participants per request.
|
|
110
|
+
# @param group_id [String] Group ID
|
|
111
|
+
# @param account_id [String] WhatsApp social account ID
|
|
112
|
+
# @param add_whats_app_group_participants_request [AddWhatsAppGroupParticipantsRequest]
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
115
|
+
def add_whats_app_group_participants_with_http_info(group_id, account_id, add_whats_app_group_participants_request, opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.add_whats_app_group_participants ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'group_id' is set
|
|
120
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.add_whats_app_group_participants"
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'account_id' is set
|
|
124
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.add_whats_app_group_participants"
|
|
126
|
+
end
|
|
127
|
+
# verify the required parameter 'add_whats_app_group_participants_request' is set
|
|
128
|
+
if @api_client.config.client_side_validation && add_whats_app_group_participants_request.nil?
|
|
129
|
+
fail ArgumentError, "Missing the required parameter 'add_whats_app_group_participants_request' when calling WhatsAppApi.add_whats_app_group_participants"
|
|
130
|
+
end
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/participants'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = opts[:query_params] || {}
|
|
136
|
+
query_params[:'accountId'] = account_id
|
|
137
|
+
|
|
138
|
+
# header parameters
|
|
139
|
+
header_params = opts[:header_params] || {}
|
|
140
|
+
# HTTP header 'Accept' (if needed)
|
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
142
|
+
# HTTP header 'Content-Type'
|
|
143
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
144
|
+
if !content_type.nil?
|
|
145
|
+
header_params['Content-Type'] = content_type
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# form parameters
|
|
149
|
+
form_params = opts[:form_params] || {}
|
|
150
|
+
|
|
151
|
+
# http body (model)
|
|
152
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_whats_app_group_participants_request)
|
|
153
|
+
|
|
154
|
+
# return_type
|
|
155
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
156
|
+
|
|
157
|
+
# auth_names
|
|
158
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
159
|
+
|
|
160
|
+
new_options = opts.merge(
|
|
161
|
+
:operation => :"WhatsAppApi.add_whats_app_group_participants",
|
|
162
|
+
:header_params => header_params,
|
|
163
|
+
:query_params => query_params,
|
|
164
|
+
:form_params => form_params,
|
|
165
|
+
:body => post_body,
|
|
166
|
+
:auth_names => auth_names,
|
|
167
|
+
:return_type => return_type
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#add_whats_app_group_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
173
|
+
end
|
|
174
|
+
return data, status_code, headers
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Approve join requests
|
|
178
|
+
# Approve pending join requests for a WhatsApp group.
|
|
179
|
+
# @param group_id [String] Group ID
|
|
180
|
+
# @param account_id [String] WhatsApp social account ID
|
|
181
|
+
# @param approve_whats_app_group_join_requests_request [ApproveWhatsAppGroupJoinRequestsRequest]
|
|
182
|
+
# @param [Hash] opts the optional parameters
|
|
183
|
+
# @return [UnpublishPost200Response]
|
|
184
|
+
def approve_whats_app_group_join_requests(group_id, account_id, approve_whats_app_group_join_requests_request, opts = {})
|
|
185
|
+
data, _status_code, _headers = approve_whats_app_group_join_requests_with_http_info(group_id, account_id, approve_whats_app_group_join_requests_request, opts)
|
|
186
|
+
data
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Approve join requests
|
|
190
|
+
# Approve pending join requests for a WhatsApp group.
|
|
191
|
+
# @param group_id [String] Group ID
|
|
192
|
+
# @param account_id [String] WhatsApp social account ID
|
|
193
|
+
# @param approve_whats_app_group_join_requests_request [ApproveWhatsAppGroupJoinRequestsRequest]
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
196
|
+
def approve_whats_app_group_join_requests_with_http_info(group_id, account_id, approve_whats_app_group_join_requests_request, opts = {})
|
|
197
|
+
if @api_client.config.debugging
|
|
198
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.approve_whats_app_group_join_requests ...'
|
|
199
|
+
end
|
|
200
|
+
# verify the required parameter 'group_id' is set
|
|
201
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
202
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.approve_whats_app_group_join_requests"
|
|
203
|
+
end
|
|
204
|
+
# verify the required parameter 'account_id' is set
|
|
205
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
206
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.approve_whats_app_group_join_requests"
|
|
207
|
+
end
|
|
208
|
+
# verify the required parameter 'approve_whats_app_group_join_requests_request' is set
|
|
209
|
+
if @api_client.config.client_side_validation && approve_whats_app_group_join_requests_request.nil?
|
|
210
|
+
fail ArgumentError, "Missing the required parameter 'approve_whats_app_group_join_requests_request' when calling WhatsAppApi.approve_whats_app_group_join_requests"
|
|
211
|
+
end
|
|
212
|
+
# resource path
|
|
213
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/join-requests'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
214
|
+
|
|
215
|
+
# query parameters
|
|
216
|
+
query_params = opts[:query_params] || {}
|
|
217
|
+
query_params[:'accountId'] = account_id
|
|
218
|
+
|
|
219
|
+
# header parameters
|
|
220
|
+
header_params = opts[:header_params] || {}
|
|
221
|
+
# HTTP header 'Accept' (if needed)
|
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
223
|
+
# HTTP header 'Content-Type'
|
|
224
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
225
|
+
if !content_type.nil?
|
|
226
|
+
header_params['Content-Type'] = content_type
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# form parameters
|
|
230
|
+
form_params = opts[:form_params] || {}
|
|
231
|
+
|
|
232
|
+
# http body (model)
|
|
233
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(approve_whats_app_group_join_requests_request)
|
|
234
|
+
|
|
235
|
+
# return_type
|
|
236
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
237
|
+
|
|
238
|
+
# auth_names
|
|
239
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
240
|
+
|
|
241
|
+
new_options = opts.merge(
|
|
242
|
+
:operation => :"WhatsAppApi.approve_whats_app_group_join_requests",
|
|
243
|
+
:header_params => header_params,
|
|
244
|
+
:query_params => query_params,
|
|
245
|
+
:form_params => form_params,
|
|
246
|
+
:body => post_body,
|
|
247
|
+
:auth_names => auth_names,
|
|
248
|
+
:return_type => return_type
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#approve_whats_app_group_join_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
254
|
+
end
|
|
255
|
+
return data, status_code, headers
|
|
256
|
+
end
|
|
257
|
+
|
|
96
258
|
# Bulk delete contacts
|
|
97
259
|
# **Deprecated.** Use `DELETE /v1/contacts/{id}` for individual deletes instead. Permanently delete multiple contacts at once (max 500 per request).
|
|
98
260
|
# @param bulk_delete_whats_app_contacts_request [BulkDeleteWhatsAppContactsRequest]
|
|
@@ -428,6 +590,144 @@ module Late
|
|
|
428
590
|
return data, status_code, headers
|
|
429
591
|
end
|
|
430
592
|
|
|
593
|
+
# Create group
|
|
594
|
+
# Create a new WhatsApp group chat. Returns the group ID and optionally an invite link.
|
|
595
|
+
# @param create_whats_app_group_chat_request [CreateWhatsAppGroupChatRequest]
|
|
596
|
+
# @param [Hash] opts the optional parameters
|
|
597
|
+
# @return [CreateWhatsAppGroupChat201Response]
|
|
598
|
+
def create_whats_app_group_chat(create_whats_app_group_chat_request, opts = {})
|
|
599
|
+
data, _status_code, _headers = create_whats_app_group_chat_with_http_info(create_whats_app_group_chat_request, opts)
|
|
600
|
+
data
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Create group
|
|
604
|
+
# Create a new WhatsApp group chat. Returns the group ID and optionally an invite link.
|
|
605
|
+
# @param create_whats_app_group_chat_request [CreateWhatsAppGroupChatRequest]
|
|
606
|
+
# @param [Hash] opts the optional parameters
|
|
607
|
+
# @return [Array<(CreateWhatsAppGroupChat201Response, Integer, Hash)>] CreateWhatsAppGroupChat201Response data, response status code and response headers
|
|
608
|
+
def create_whats_app_group_chat_with_http_info(create_whats_app_group_chat_request, opts = {})
|
|
609
|
+
if @api_client.config.debugging
|
|
610
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.create_whats_app_group_chat ...'
|
|
611
|
+
end
|
|
612
|
+
# verify the required parameter 'create_whats_app_group_chat_request' is set
|
|
613
|
+
if @api_client.config.client_side_validation && create_whats_app_group_chat_request.nil?
|
|
614
|
+
fail ArgumentError, "Missing the required parameter 'create_whats_app_group_chat_request' when calling WhatsAppApi.create_whats_app_group_chat"
|
|
615
|
+
end
|
|
616
|
+
# resource path
|
|
617
|
+
local_var_path = '/v1/whatsapp/wa-groups'
|
|
618
|
+
|
|
619
|
+
# query parameters
|
|
620
|
+
query_params = opts[:query_params] || {}
|
|
621
|
+
|
|
622
|
+
# header parameters
|
|
623
|
+
header_params = opts[:header_params] || {}
|
|
624
|
+
# HTTP header 'Accept' (if needed)
|
|
625
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
626
|
+
# HTTP header 'Content-Type'
|
|
627
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
628
|
+
if !content_type.nil?
|
|
629
|
+
header_params['Content-Type'] = content_type
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# form parameters
|
|
633
|
+
form_params = opts[:form_params] || {}
|
|
634
|
+
|
|
635
|
+
# http body (model)
|
|
636
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_whats_app_group_chat_request)
|
|
637
|
+
|
|
638
|
+
# return_type
|
|
639
|
+
return_type = opts[:debug_return_type] || 'CreateWhatsAppGroupChat201Response'
|
|
640
|
+
|
|
641
|
+
# auth_names
|
|
642
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
643
|
+
|
|
644
|
+
new_options = opts.merge(
|
|
645
|
+
:operation => :"WhatsAppApi.create_whats_app_group_chat",
|
|
646
|
+
:header_params => header_params,
|
|
647
|
+
:query_params => query_params,
|
|
648
|
+
:form_params => form_params,
|
|
649
|
+
:body => post_body,
|
|
650
|
+
:auth_names => auth_names,
|
|
651
|
+
:return_type => return_type
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
655
|
+
if @api_client.config.debugging
|
|
656
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#create_whats_app_group_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
657
|
+
end
|
|
658
|
+
return data, status_code, headers
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Create invite link
|
|
662
|
+
# Create a new invite link for a WhatsApp group. The previous link is revoked.
|
|
663
|
+
# @param group_id [String] Group ID
|
|
664
|
+
# @param account_id [String] WhatsApp social account ID
|
|
665
|
+
# @param [Hash] opts the optional parameters
|
|
666
|
+
# @return [CreateWhatsAppGroupInviteLink200Response]
|
|
667
|
+
def create_whats_app_group_invite_link(group_id, account_id, opts = {})
|
|
668
|
+
data, _status_code, _headers = create_whats_app_group_invite_link_with_http_info(group_id, account_id, opts)
|
|
669
|
+
data
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
# Create invite link
|
|
673
|
+
# Create a new invite link for a WhatsApp group. The previous link is revoked.
|
|
674
|
+
# @param group_id [String] Group ID
|
|
675
|
+
# @param account_id [String] WhatsApp social account ID
|
|
676
|
+
# @param [Hash] opts the optional parameters
|
|
677
|
+
# @return [Array<(CreateWhatsAppGroupInviteLink200Response, Integer, Hash)>] CreateWhatsAppGroupInviteLink200Response data, response status code and response headers
|
|
678
|
+
def create_whats_app_group_invite_link_with_http_info(group_id, account_id, opts = {})
|
|
679
|
+
if @api_client.config.debugging
|
|
680
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.create_whats_app_group_invite_link ...'
|
|
681
|
+
end
|
|
682
|
+
# verify the required parameter 'group_id' is set
|
|
683
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
684
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.create_whats_app_group_invite_link"
|
|
685
|
+
end
|
|
686
|
+
# verify the required parameter 'account_id' is set
|
|
687
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
688
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.create_whats_app_group_invite_link"
|
|
689
|
+
end
|
|
690
|
+
# resource path
|
|
691
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/invite-link'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
692
|
+
|
|
693
|
+
# query parameters
|
|
694
|
+
query_params = opts[:query_params] || {}
|
|
695
|
+
query_params[:'accountId'] = account_id
|
|
696
|
+
|
|
697
|
+
# header parameters
|
|
698
|
+
header_params = opts[:header_params] || {}
|
|
699
|
+
# HTTP header 'Accept' (if needed)
|
|
700
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
701
|
+
|
|
702
|
+
# form parameters
|
|
703
|
+
form_params = opts[:form_params] || {}
|
|
704
|
+
|
|
705
|
+
# http body (model)
|
|
706
|
+
post_body = opts[:debug_body]
|
|
707
|
+
|
|
708
|
+
# return_type
|
|
709
|
+
return_type = opts[:debug_return_type] || 'CreateWhatsAppGroupInviteLink200Response'
|
|
710
|
+
|
|
711
|
+
# auth_names
|
|
712
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
713
|
+
|
|
714
|
+
new_options = opts.merge(
|
|
715
|
+
:operation => :"WhatsAppApi.create_whats_app_group_invite_link",
|
|
716
|
+
:header_params => header_params,
|
|
717
|
+
:query_params => query_params,
|
|
718
|
+
:form_params => form_params,
|
|
719
|
+
:body => post_body,
|
|
720
|
+
:auth_names => auth_names,
|
|
721
|
+
:return_type => return_type
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
725
|
+
if @api_client.config.debugging
|
|
726
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#create_whats_app_group_invite_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
727
|
+
end
|
|
728
|
+
return data, status_code, headers
|
|
729
|
+
end
|
|
730
|
+
|
|
431
731
|
# Create template
|
|
432
732
|
# Create a new message template. Supports two modes: **Custom template:** Provide `components` with your own content. Submitted to Meta for review (can take up to 24h). **Library template:** Provide `library_template_name` instead of `components` to use a pre-built template from Meta's template library. Library templates are **pre-approved** (no review wait). You can optionally customize parameters and buttons via `library_template_body_inputs` and `library_template_button_inputs`. Browse available library templates at: https://business.facebook.com/wa/manage/message-templates/
|
|
433
733
|
# @param create_whats_app_template_request [CreateWhatsAppTemplateRequest]
|
|
@@ -690,37 +990,37 @@ module Late
|
|
|
690
990
|
return data, status_code, headers
|
|
691
991
|
end
|
|
692
992
|
|
|
693
|
-
# Delete
|
|
694
|
-
#
|
|
695
|
-
# @param
|
|
993
|
+
# Delete group
|
|
994
|
+
# Delete a WhatsApp group and remove all participants.
|
|
995
|
+
# @param group_id [String] Group ID
|
|
696
996
|
# @param account_id [String] WhatsApp social account ID
|
|
697
997
|
# @param [Hash] opts the optional parameters
|
|
698
998
|
# @return [UnpublishPost200Response]
|
|
699
|
-
def
|
|
700
|
-
data, _status_code, _headers =
|
|
999
|
+
def delete_whats_app_group_chat(group_id, account_id, opts = {})
|
|
1000
|
+
data, _status_code, _headers = delete_whats_app_group_chat_with_http_info(group_id, account_id, opts)
|
|
701
1001
|
data
|
|
702
1002
|
end
|
|
703
1003
|
|
|
704
|
-
# Delete
|
|
705
|
-
#
|
|
706
|
-
# @param
|
|
1004
|
+
# Delete group
|
|
1005
|
+
# Delete a WhatsApp group and remove all participants.
|
|
1006
|
+
# @param group_id [String] Group ID
|
|
707
1007
|
# @param account_id [String] WhatsApp social account ID
|
|
708
1008
|
# @param [Hash] opts the optional parameters
|
|
709
1009
|
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
710
|
-
def
|
|
1010
|
+
def delete_whats_app_group_chat_with_http_info(group_id, account_id, opts = {})
|
|
711
1011
|
if @api_client.config.debugging
|
|
712
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
1012
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.delete_whats_app_group_chat ...'
|
|
713
1013
|
end
|
|
714
|
-
# verify the required parameter '
|
|
715
|
-
if @api_client.config.client_side_validation &&
|
|
716
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1014
|
+
# verify the required parameter 'group_id' is set
|
|
1015
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
1016
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.delete_whats_app_group_chat"
|
|
717
1017
|
end
|
|
718
1018
|
# verify the required parameter 'account_id' is set
|
|
719
1019
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
720
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.
|
|
1020
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.delete_whats_app_group_chat"
|
|
721
1021
|
end
|
|
722
1022
|
# resource path
|
|
723
|
-
local_var_path = '/v1/whatsapp/
|
|
1023
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
724
1024
|
|
|
725
1025
|
# query parameters
|
|
726
1026
|
query_params = opts[:query_params] || {}
|
|
@@ -744,7 +1044,7 @@ module Late
|
|
|
744
1044
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
745
1045
|
|
|
746
1046
|
new_options = opts.merge(
|
|
747
|
-
:operation => :"WhatsAppApi.
|
|
1047
|
+
:operation => :"WhatsAppApi.delete_whats_app_group_chat",
|
|
748
1048
|
:header_params => header_params,
|
|
749
1049
|
:query_params => query_params,
|
|
750
1050
|
:form_params => form_params,
|
|
@@ -755,28 +1055,98 @@ module Late
|
|
|
755
1055
|
|
|
756
1056
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
757
1057
|
if @api_client.config.debugging
|
|
758
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
1058
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#delete_whats_app_group_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
759
1059
|
end
|
|
760
1060
|
return data, status_code, headers
|
|
761
1061
|
end
|
|
762
1062
|
|
|
763
|
-
#
|
|
764
|
-
#
|
|
765
|
-
# @param
|
|
1063
|
+
# Delete template
|
|
1064
|
+
# Permanently delete a message template by name.
|
|
1065
|
+
# @param template_name [String] Template name
|
|
1066
|
+
# @param account_id [String] WhatsApp social account ID
|
|
766
1067
|
# @param [Hash] opts the optional parameters
|
|
767
|
-
# @return [
|
|
768
|
-
def
|
|
769
|
-
data, _status_code, _headers =
|
|
1068
|
+
# @return [UnpublishPost200Response]
|
|
1069
|
+
def delete_whats_app_template(template_name, account_id, opts = {})
|
|
1070
|
+
data, _status_code, _headers = delete_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
770
1071
|
data
|
|
771
1072
|
end
|
|
772
1073
|
|
|
773
|
-
#
|
|
774
|
-
#
|
|
775
|
-
# @param
|
|
1074
|
+
# Delete template
|
|
1075
|
+
# Permanently delete a message template by name.
|
|
1076
|
+
# @param template_name [String] Template name
|
|
1077
|
+
# @param account_id [String] WhatsApp social account ID
|
|
776
1078
|
# @param [Hash] opts the optional parameters
|
|
777
|
-
# @return [Array<(
|
|
778
|
-
def
|
|
779
|
-
if @api_client.config.debugging
|
|
1079
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
1080
|
+
def delete_whats_app_template_with_http_info(template_name, account_id, opts = {})
|
|
1081
|
+
if @api_client.config.debugging
|
|
1082
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.delete_whats_app_template ...'
|
|
1083
|
+
end
|
|
1084
|
+
# verify the required parameter 'template_name' is set
|
|
1085
|
+
if @api_client.config.client_side_validation && template_name.nil?
|
|
1086
|
+
fail ArgumentError, "Missing the required parameter 'template_name' when calling WhatsAppApi.delete_whats_app_template"
|
|
1087
|
+
end
|
|
1088
|
+
# verify the required parameter 'account_id' is set
|
|
1089
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1090
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.delete_whats_app_template"
|
|
1091
|
+
end
|
|
1092
|
+
# resource path
|
|
1093
|
+
local_var_path = '/v1/whatsapp/templates/{templateName}'.sub('{' + 'templateName' + '}', CGI.escape(template_name.to_s))
|
|
1094
|
+
|
|
1095
|
+
# query parameters
|
|
1096
|
+
query_params = opts[:query_params] || {}
|
|
1097
|
+
query_params[:'accountId'] = account_id
|
|
1098
|
+
|
|
1099
|
+
# header parameters
|
|
1100
|
+
header_params = opts[:header_params] || {}
|
|
1101
|
+
# HTTP header 'Accept' (if needed)
|
|
1102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1103
|
+
|
|
1104
|
+
# form parameters
|
|
1105
|
+
form_params = opts[:form_params] || {}
|
|
1106
|
+
|
|
1107
|
+
# http body (model)
|
|
1108
|
+
post_body = opts[:debug_body]
|
|
1109
|
+
|
|
1110
|
+
# return_type
|
|
1111
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
1112
|
+
|
|
1113
|
+
# auth_names
|
|
1114
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1115
|
+
|
|
1116
|
+
new_options = opts.merge(
|
|
1117
|
+
:operation => :"WhatsAppApi.delete_whats_app_template",
|
|
1118
|
+
:header_params => header_params,
|
|
1119
|
+
:query_params => query_params,
|
|
1120
|
+
:form_params => form_params,
|
|
1121
|
+
:body => post_body,
|
|
1122
|
+
:auth_names => auth_names,
|
|
1123
|
+
:return_type => return_type
|
|
1124
|
+
)
|
|
1125
|
+
|
|
1126
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1127
|
+
if @api_client.config.debugging
|
|
1128
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#delete_whats_app_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1129
|
+
end
|
|
1130
|
+
return data, status_code, headers
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
# Get broadcast
|
|
1134
|
+
# **Deprecated.** Use `GET /v1/broadcasts/{id}` instead. Retrieve detailed information about a single broadcast including delivery statistics.
|
|
1135
|
+
# @param broadcast_id [String] Broadcast ID
|
|
1136
|
+
# @param [Hash] opts the optional parameters
|
|
1137
|
+
# @return [GetWhatsAppBroadcast200Response]
|
|
1138
|
+
def get_whats_app_broadcast(broadcast_id, opts = {})
|
|
1139
|
+
data, _status_code, _headers = get_whats_app_broadcast_with_http_info(broadcast_id, opts)
|
|
1140
|
+
data
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
# Get broadcast
|
|
1144
|
+
# **Deprecated.** Use `GET /v1/broadcasts/{id}` instead. Retrieve detailed information about a single broadcast including delivery statistics.
|
|
1145
|
+
# @param broadcast_id [String] Broadcast ID
|
|
1146
|
+
# @param [Hash] opts the optional parameters
|
|
1147
|
+
# @return [Array<(GetWhatsAppBroadcast200Response, Integer, Hash)>] GetWhatsAppBroadcast200Response data, response status code and response headers
|
|
1148
|
+
def get_whats_app_broadcast_with_http_info(broadcast_id, opts = {})
|
|
1149
|
+
if @api_client.config.debugging
|
|
780
1150
|
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_broadcast ...'
|
|
781
1151
|
end
|
|
782
1152
|
# verify the required parameter 'broadcast_id' is set
|
|
@@ -1199,21 +1569,289 @@ module Late
|
|
|
1199
1569
|
data
|
|
1200
1570
|
end
|
|
1201
1571
|
|
|
1202
|
-
# Get display name and review status
|
|
1203
|
-
# Fetch the current display name and its Meta review status for a WhatsApp Business account. Display name changes require Meta approval and can take 1-3 business days.
|
|
1572
|
+
# Get display name and review status
|
|
1573
|
+
# Fetch the current display name and its Meta review status for a WhatsApp Business account. Display name changes require Meta approval and can take 1-3 business days.
|
|
1574
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1575
|
+
# @param [Hash] opts the optional parameters
|
|
1576
|
+
# @return [Array<(GetWhatsAppDisplayName200Response, Integer, Hash)>] GetWhatsAppDisplayName200Response data, response status code and response headers
|
|
1577
|
+
def get_whats_app_display_name_with_http_info(account_id, opts = {})
|
|
1578
|
+
if @api_client.config.debugging
|
|
1579
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_display_name ...'
|
|
1580
|
+
end
|
|
1581
|
+
# verify the required parameter 'account_id' is set
|
|
1582
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1583
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_display_name"
|
|
1584
|
+
end
|
|
1585
|
+
# resource path
|
|
1586
|
+
local_var_path = '/v1/whatsapp/business-profile/display-name'
|
|
1587
|
+
|
|
1588
|
+
# query parameters
|
|
1589
|
+
query_params = opts[:query_params] || {}
|
|
1590
|
+
query_params[:'accountId'] = account_id
|
|
1591
|
+
|
|
1592
|
+
# header parameters
|
|
1593
|
+
header_params = opts[:header_params] || {}
|
|
1594
|
+
# HTTP header 'Accept' (if needed)
|
|
1595
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1596
|
+
|
|
1597
|
+
# form parameters
|
|
1598
|
+
form_params = opts[:form_params] || {}
|
|
1599
|
+
|
|
1600
|
+
# http body (model)
|
|
1601
|
+
post_body = opts[:debug_body]
|
|
1602
|
+
|
|
1603
|
+
# return_type
|
|
1604
|
+
return_type = opts[:debug_return_type] || 'GetWhatsAppDisplayName200Response'
|
|
1605
|
+
|
|
1606
|
+
# auth_names
|
|
1607
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1608
|
+
|
|
1609
|
+
new_options = opts.merge(
|
|
1610
|
+
:operation => :"WhatsAppApi.get_whats_app_display_name",
|
|
1611
|
+
:header_params => header_params,
|
|
1612
|
+
:query_params => query_params,
|
|
1613
|
+
:form_params => form_params,
|
|
1614
|
+
:body => post_body,
|
|
1615
|
+
:auth_names => auth_names,
|
|
1616
|
+
:return_type => return_type
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1620
|
+
if @api_client.config.debugging
|
|
1621
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_display_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1622
|
+
end
|
|
1623
|
+
return data, status_code, headers
|
|
1624
|
+
end
|
|
1625
|
+
|
|
1626
|
+
# Get group info
|
|
1627
|
+
# Retrieve metadata about a WhatsApp group including subject, description, participants, and settings.
|
|
1628
|
+
# @param group_id [String] Group ID
|
|
1629
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1630
|
+
# @param [Hash] opts the optional parameters
|
|
1631
|
+
# @return [GetWhatsAppGroupChat200Response]
|
|
1632
|
+
def get_whats_app_group_chat(group_id, account_id, opts = {})
|
|
1633
|
+
data, _status_code, _headers = get_whats_app_group_chat_with_http_info(group_id, account_id, opts)
|
|
1634
|
+
data
|
|
1635
|
+
end
|
|
1636
|
+
|
|
1637
|
+
# Get group info
|
|
1638
|
+
# Retrieve metadata about a WhatsApp group including subject, description, participants, and settings.
|
|
1639
|
+
# @param group_id [String] Group ID
|
|
1640
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1641
|
+
# @param [Hash] opts the optional parameters
|
|
1642
|
+
# @return [Array<(GetWhatsAppGroupChat200Response, Integer, Hash)>] GetWhatsAppGroupChat200Response data, response status code and response headers
|
|
1643
|
+
def get_whats_app_group_chat_with_http_info(group_id, account_id, opts = {})
|
|
1644
|
+
if @api_client.config.debugging
|
|
1645
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_group_chat ...'
|
|
1646
|
+
end
|
|
1647
|
+
# verify the required parameter 'group_id' is set
|
|
1648
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
1649
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.get_whats_app_group_chat"
|
|
1650
|
+
end
|
|
1651
|
+
# verify the required parameter 'account_id' is set
|
|
1652
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1653
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_group_chat"
|
|
1654
|
+
end
|
|
1655
|
+
# resource path
|
|
1656
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
1657
|
+
|
|
1658
|
+
# query parameters
|
|
1659
|
+
query_params = opts[:query_params] || {}
|
|
1660
|
+
query_params[:'accountId'] = account_id
|
|
1661
|
+
|
|
1662
|
+
# header parameters
|
|
1663
|
+
header_params = opts[:header_params] || {}
|
|
1664
|
+
# HTTP header 'Accept' (if needed)
|
|
1665
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1666
|
+
|
|
1667
|
+
# form parameters
|
|
1668
|
+
form_params = opts[:form_params] || {}
|
|
1669
|
+
|
|
1670
|
+
# http body (model)
|
|
1671
|
+
post_body = opts[:debug_body]
|
|
1672
|
+
|
|
1673
|
+
# return_type
|
|
1674
|
+
return_type = opts[:debug_return_type] || 'GetWhatsAppGroupChat200Response'
|
|
1675
|
+
|
|
1676
|
+
# auth_names
|
|
1677
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1678
|
+
|
|
1679
|
+
new_options = opts.merge(
|
|
1680
|
+
:operation => :"WhatsAppApi.get_whats_app_group_chat",
|
|
1681
|
+
:header_params => header_params,
|
|
1682
|
+
:query_params => query_params,
|
|
1683
|
+
:form_params => form_params,
|
|
1684
|
+
:body => post_body,
|
|
1685
|
+
:auth_names => auth_names,
|
|
1686
|
+
:return_type => return_type
|
|
1687
|
+
)
|
|
1688
|
+
|
|
1689
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1690
|
+
if @api_client.config.debugging
|
|
1691
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_group_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1692
|
+
end
|
|
1693
|
+
return data, status_code, headers
|
|
1694
|
+
end
|
|
1695
|
+
|
|
1696
|
+
# List contact groups
|
|
1697
|
+
# **Deprecated.** Use contact tags via `GET /v1/contacts` for grouping instead. WhatsApp groups have no cross-platform equivalent. List all contact groups for a WhatsApp account with contact counts. Groups are derived from the groups field on contacts, not stored as separate documents.
|
|
1698
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1699
|
+
# @param [Hash] opts the optional parameters
|
|
1700
|
+
# @return [GetWhatsAppGroups200Response]
|
|
1701
|
+
def get_whats_app_groups(account_id, opts = {})
|
|
1702
|
+
data, _status_code, _headers = get_whats_app_groups_with_http_info(account_id, opts)
|
|
1703
|
+
data
|
|
1704
|
+
end
|
|
1705
|
+
|
|
1706
|
+
# List contact groups
|
|
1707
|
+
# **Deprecated.** Use contact tags via `GET /v1/contacts` for grouping instead. WhatsApp groups have no cross-platform equivalent. List all contact groups for a WhatsApp account with contact counts. Groups are derived from the groups field on contacts, not stored as separate documents.
|
|
1708
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1709
|
+
# @param [Hash] opts the optional parameters
|
|
1710
|
+
# @return [Array<(GetWhatsAppGroups200Response, Integer, Hash)>] GetWhatsAppGroups200Response data, response status code and response headers
|
|
1711
|
+
def get_whats_app_groups_with_http_info(account_id, opts = {})
|
|
1712
|
+
if @api_client.config.debugging
|
|
1713
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_groups ...'
|
|
1714
|
+
end
|
|
1715
|
+
# verify the required parameter 'account_id' is set
|
|
1716
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1717
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_groups"
|
|
1718
|
+
end
|
|
1719
|
+
# resource path
|
|
1720
|
+
local_var_path = '/v1/whatsapp/groups'
|
|
1721
|
+
|
|
1722
|
+
# query parameters
|
|
1723
|
+
query_params = opts[:query_params] || {}
|
|
1724
|
+
query_params[:'accountId'] = account_id
|
|
1725
|
+
|
|
1726
|
+
# header parameters
|
|
1727
|
+
header_params = opts[:header_params] || {}
|
|
1728
|
+
# HTTP header 'Accept' (if needed)
|
|
1729
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1730
|
+
|
|
1731
|
+
# form parameters
|
|
1732
|
+
form_params = opts[:form_params] || {}
|
|
1733
|
+
|
|
1734
|
+
# http body (model)
|
|
1735
|
+
post_body = opts[:debug_body]
|
|
1736
|
+
|
|
1737
|
+
# return_type
|
|
1738
|
+
return_type = opts[:debug_return_type] || 'GetWhatsAppGroups200Response'
|
|
1739
|
+
|
|
1740
|
+
# auth_names
|
|
1741
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1742
|
+
|
|
1743
|
+
new_options = opts.merge(
|
|
1744
|
+
:operation => :"WhatsAppApi.get_whats_app_groups",
|
|
1745
|
+
:header_params => header_params,
|
|
1746
|
+
:query_params => query_params,
|
|
1747
|
+
:form_params => form_params,
|
|
1748
|
+
:body => post_body,
|
|
1749
|
+
:auth_names => auth_names,
|
|
1750
|
+
:return_type => return_type
|
|
1751
|
+
)
|
|
1752
|
+
|
|
1753
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1754
|
+
if @api_client.config.debugging
|
|
1755
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1756
|
+
end
|
|
1757
|
+
return data, status_code, headers
|
|
1758
|
+
end
|
|
1759
|
+
|
|
1760
|
+
# Get template
|
|
1761
|
+
# Retrieve a single message template by name.
|
|
1762
|
+
# @param template_name [String] Template name
|
|
1763
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1764
|
+
# @param [Hash] opts the optional parameters
|
|
1765
|
+
# @return [GetWhatsAppTemplate200Response]
|
|
1766
|
+
def get_whats_app_template(template_name, account_id, opts = {})
|
|
1767
|
+
data, _status_code, _headers = get_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
1768
|
+
data
|
|
1769
|
+
end
|
|
1770
|
+
|
|
1771
|
+
# Get template
|
|
1772
|
+
# Retrieve a single message template by name.
|
|
1773
|
+
# @param template_name [String] Template name
|
|
1774
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1775
|
+
# @param [Hash] opts the optional parameters
|
|
1776
|
+
# @return [Array<(GetWhatsAppTemplate200Response, Integer, Hash)>] GetWhatsAppTemplate200Response data, response status code and response headers
|
|
1777
|
+
def get_whats_app_template_with_http_info(template_name, account_id, opts = {})
|
|
1778
|
+
if @api_client.config.debugging
|
|
1779
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_template ...'
|
|
1780
|
+
end
|
|
1781
|
+
# verify the required parameter 'template_name' is set
|
|
1782
|
+
if @api_client.config.client_side_validation && template_name.nil?
|
|
1783
|
+
fail ArgumentError, "Missing the required parameter 'template_name' when calling WhatsAppApi.get_whats_app_template"
|
|
1784
|
+
end
|
|
1785
|
+
# verify the required parameter 'account_id' is set
|
|
1786
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1787
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_template"
|
|
1788
|
+
end
|
|
1789
|
+
# resource path
|
|
1790
|
+
local_var_path = '/v1/whatsapp/templates/{templateName}'.sub('{' + 'templateName' + '}', CGI.escape(template_name.to_s))
|
|
1791
|
+
|
|
1792
|
+
# query parameters
|
|
1793
|
+
query_params = opts[:query_params] || {}
|
|
1794
|
+
query_params[:'accountId'] = account_id
|
|
1795
|
+
|
|
1796
|
+
# header parameters
|
|
1797
|
+
header_params = opts[:header_params] || {}
|
|
1798
|
+
# HTTP header 'Accept' (if needed)
|
|
1799
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1800
|
+
|
|
1801
|
+
# form parameters
|
|
1802
|
+
form_params = opts[:form_params] || {}
|
|
1803
|
+
|
|
1804
|
+
# http body (model)
|
|
1805
|
+
post_body = opts[:debug_body]
|
|
1806
|
+
|
|
1807
|
+
# return_type
|
|
1808
|
+
return_type = opts[:debug_return_type] || 'GetWhatsAppTemplate200Response'
|
|
1809
|
+
|
|
1810
|
+
# auth_names
|
|
1811
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1812
|
+
|
|
1813
|
+
new_options = opts.merge(
|
|
1814
|
+
:operation => :"WhatsAppApi.get_whats_app_template",
|
|
1815
|
+
:header_params => header_params,
|
|
1816
|
+
:query_params => query_params,
|
|
1817
|
+
:form_params => form_params,
|
|
1818
|
+
:body => post_body,
|
|
1819
|
+
:auth_names => auth_names,
|
|
1820
|
+
:return_type => return_type
|
|
1821
|
+
)
|
|
1822
|
+
|
|
1823
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1824
|
+
if @api_client.config.debugging
|
|
1825
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1826
|
+
end
|
|
1827
|
+
return data, status_code, headers
|
|
1828
|
+
end
|
|
1829
|
+
|
|
1830
|
+
# List templates
|
|
1831
|
+
# List all message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API.
|
|
1832
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1833
|
+
# @param [Hash] opts the optional parameters
|
|
1834
|
+
# @return [GetWhatsAppTemplates200Response]
|
|
1835
|
+
def get_whats_app_templates(account_id, opts = {})
|
|
1836
|
+
data, _status_code, _headers = get_whats_app_templates_with_http_info(account_id, opts)
|
|
1837
|
+
data
|
|
1838
|
+
end
|
|
1839
|
+
|
|
1840
|
+
# List templates
|
|
1841
|
+
# List all message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API.
|
|
1204
1842
|
# @param account_id [String] WhatsApp social account ID
|
|
1205
1843
|
# @param [Hash] opts the optional parameters
|
|
1206
|
-
# @return [Array<(
|
|
1207
|
-
def
|
|
1844
|
+
# @return [Array<(GetWhatsAppTemplates200Response, Integer, Hash)>] GetWhatsAppTemplates200Response data, response status code and response headers
|
|
1845
|
+
def get_whats_app_templates_with_http_info(account_id, opts = {})
|
|
1208
1846
|
if @api_client.config.debugging
|
|
1209
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
1847
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.get_whats_app_templates ...'
|
|
1210
1848
|
end
|
|
1211
1849
|
# verify the required parameter 'account_id' is set
|
|
1212
1850
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
1213
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.
|
|
1851
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.get_whats_app_templates"
|
|
1214
1852
|
end
|
|
1215
1853
|
# resource path
|
|
1216
|
-
local_var_path = '/v1/whatsapp/
|
|
1854
|
+
local_var_path = '/v1/whatsapp/templates'
|
|
1217
1855
|
|
|
1218
1856
|
# query parameters
|
|
1219
1857
|
query_params = opts[:query_params] || {}
|
|
@@ -1231,13 +1869,13 @@ module Late
|
|
|
1231
1869
|
post_body = opts[:debug_body]
|
|
1232
1870
|
|
|
1233
1871
|
# return_type
|
|
1234
|
-
return_type = opts[:debug_return_type] || '
|
|
1872
|
+
return_type = opts[:debug_return_type] || 'GetWhatsAppTemplates200Response'
|
|
1235
1873
|
|
|
1236
1874
|
# auth_names
|
|
1237
1875
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1238
1876
|
|
|
1239
1877
|
new_options = opts.merge(
|
|
1240
|
-
:operation => :"WhatsAppApi.
|
|
1878
|
+
:operation => :"WhatsAppApi.get_whats_app_templates",
|
|
1241
1879
|
:header_params => header_params,
|
|
1242
1880
|
:query_params => query_params,
|
|
1243
1881
|
:form_params => form_params,
|
|
@@ -1248,60 +1886,64 @@ module Late
|
|
|
1248
1886
|
|
|
1249
1887
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1250
1888
|
if @api_client.config.debugging
|
|
1251
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
1889
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#get_whats_app_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1252
1890
|
end
|
|
1253
1891
|
return data, status_code, headers
|
|
1254
1892
|
end
|
|
1255
1893
|
|
|
1256
|
-
#
|
|
1257
|
-
# **Deprecated.** Use
|
|
1258
|
-
# @param
|
|
1894
|
+
# Bulk import contacts
|
|
1895
|
+
# **Deprecated.** Use `POST /v1/contacts/bulk` instead. Import up to 1000 contacts at once. Each contact requires a phone number and name. Duplicates are skipped by default. Supports default tags and groups applied to all imported contacts.
|
|
1896
|
+
# @param import_whats_app_contacts_request [ImportWhatsAppContactsRequest]
|
|
1259
1897
|
# @param [Hash] opts the optional parameters
|
|
1260
|
-
# @return [
|
|
1261
|
-
def
|
|
1262
|
-
data, _status_code, _headers =
|
|
1898
|
+
# @return [ImportWhatsAppContacts200Response]
|
|
1899
|
+
def import_whats_app_contacts(import_whats_app_contacts_request, opts = {})
|
|
1900
|
+
data, _status_code, _headers = import_whats_app_contacts_with_http_info(import_whats_app_contacts_request, opts)
|
|
1263
1901
|
data
|
|
1264
1902
|
end
|
|
1265
1903
|
|
|
1266
|
-
#
|
|
1267
|
-
# **Deprecated.** Use
|
|
1268
|
-
# @param
|
|
1904
|
+
# Bulk import contacts
|
|
1905
|
+
# **Deprecated.** Use `POST /v1/contacts/bulk` instead. Import up to 1000 contacts at once. Each contact requires a phone number and name. Duplicates are skipped by default. Supports default tags and groups applied to all imported contacts.
|
|
1906
|
+
# @param import_whats_app_contacts_request [ImportWhatsAppContactsRequest]
|
|
1269
1907
|
# @param [Hash] opts the optional parameters
|
|
1270
|
-
# @return [Array<(
|
|
1271
|
-
def
|
|
1908
|
+
# @return [Array<(ImportWhatsAppContacts200Response, Integer, Hash)>] ImportWhatsAppContacts200Response data, response status code and response headers
|
|
1909
|
+
def import_whats_app_contacts_with_http_info(import_whats_app_contacts_request, opts = {})
|
|
1272
1910
|
if @api_client.config.debugging
|
|
1273
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
1911
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.import_whats_app_contacts ...'
|
|
1274
1912
|
end
|
|
1275
|
-
# verify the required parameter '
|
|
1276
|
-
if @api_client.config.client_side_validation &&
|
|
1277
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1913
|
+
# verify the required parameter 'import_whats_app_contacts_request' is set
|
|
1914
|
+
if @api_client.config.client_side_validation && import_whats_app_contacts_request.nil?
|
|
1915
|
+
fail ArgumentError, "Missing the required parameter 'import_whats_app_contacts_request' when calling WhatsAppApi.import_whats_app_contacts"
|
|
1278
1916
|
end
|
|
1279
1917
|
# resource path
|
|
1280
|
-
local_var_path = '/v1/whatsapp/
|
|
1918
|
+
local_var_path = '/v1/whatsapp/contacts/import'
|
|
1281
1919
|
|
|
1282
1920
|
# query parameters
|
|
1283
1921
|
query_params = opts[:query_params] || {}
|
|
1284
|
-
query_params[:'accountId'] = account_id
|
|
1285
1922
|
|
|
1286
1923
|
# header parameters
|
|
1287
1924
|
header_params = opts[:header_params] || {}
|
|
1288
1925
|
# HTTP header 'Accept' (if needed)
|
|
1289
1926
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1927
|
+
# HTTP header 'Content-Type'
|
|
1928
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1929
|
+
if !content_type.nil?
|
|
1930
|
+
header_params['Content-Type'] = content_type
|
|
1931
|
+
end
|
|
1290
1932
|
|
|
1291
1933
|
# form parameters
|
|
1292
1934
|
form_params = opts[:form_params] || {}
|
|
1293
1935
|
|
|
1294
1936
|
# http body (model)
|
|
1295
|
-
post_body = opts[:debug_body]
|
|
1937
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(import_whats_app_contacts_request)
|
|
1296
1938
|
|
|
1297
1939
|
# return_type
|
|
1298
|
-
return_type = opts[:debug_return_type] || '
|
|
1940
|
+
return_type = opts[:debug_return_type] || 'ImportWhatsAppContacts200Response'
|
|
1299
1941
|
|
|
1300
1942
|
# auth_names
|
|
1301
1943
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1302
1944
|
|
|
1303
1945
|
new_options = opts.merge(
|
|
1304
|
-
:operation => :"WhatsAppApi.
|
|
1946
|
+
:operation => :"WhatsAppApi.import_whats_app_contacts",
|
|
1305
1947
|
:header_params => header_params,
|
|
1306
1948
|
:query_params => query_params,
|
|
1307
1949
|
:form_params => form_params,
|
|
@@ -1310,48 +1952,52 @@ module Late
|
|
|
1310
1952
|
:return_type => return_type
|
|
1311
1953
|
)
|
|
1312
1954
|
|
|
1313
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1955
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1314
1956
|
if @api_client.config.debugging
|
|
1315
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
1957
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#import_whats_app_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1316
1958
|
end
|
|
1317
1959
|
return data, status_code, headers
|
|
1318
1960
|
end
|
|
1319
1961
|
|
|
1320
|
-
#
|
|
1321
|
-
#
|
|
1322
|
-
# @param template_name [String] Template name
|
|
1962
|
+
# List active groups
|
|
1963
|
+
# List active WhatsApp group chats for a business phone number. These are actual WhatsApp group conversations on the platform.
|
|
1323
1964
|
# @param account_id [String] WhatsApp social account ID
|
|
1324
1965
|
# @param [Hash] opts the optional parameters
|
|
1325
|
-
# @
|
|
1326
|
-
|
|
1327
|
-
|
|
1966
|
+
# @option opts [Integer] :limit Max groups to return (default to 25)
|
|
1967
|
+
# @option opts [String] :after Pagination cursor
|
|
1968
|
+
# @return [ListWhatsAppGroupChats200Response]
|
|
1969
|
+
def list_whats_app_group_chats(account_id, opts = {})
|
|
1970
|
+
data, _status_code, _headers = list_whats_app_group_chats_with_http_info(account_id, opts)
|
|
1328
1971
|
data
|
|
1329
1972
|
end
|
|
1330
1973
|
|
|
1331
|
-
#
|
|
1332
|
-
#
|
|
1333
|
-
# @param template_name [String] Template name
|
|
1974
|
+
# List active groups
|
|
1975
|
+
# List active WhatsApp group chats for a business phone number. These are actual WhatsApp group conversations on the platform.
|
|
1334
1976
|
# @param account_id [String] WhatsApp social account ID
|
|
1335
1977
|
# @param [Hash] opts the optional parameters
|
|
1336
|
-
# @
|
|
1337
|
-
|
|
1978
|
+
# @option opts [Integer] :limit Max groups to return (default to 25)
|
|
1979
|
+
# @option opts [String] :after Pagination cursor
|
|
1980
|
+
# @return [Array<(ListWhatsAppGroupChats200Response, Integer, Hash)>] ListWhatsAppGroupChats200Response data, response status code and response headers
|
|
1981
|
+
def list_whats_app_group_chats_with_http_info(account_id, opts = {})
|
|
1338
1982
|
if @api_client.config.debugging
|
|
1339
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
1340
|
-
end
|
|
1341
|
-
# verify the required parameter 'template_name' is set
|
|
1342
|
-
if @api_client.config.client_side_validation && template_name.nil?
|
|
1343
|
-
fail ArgumentError, "Missing the required parameter 'template_name' when calling WhatsAppApi.get_whats_app_template"
|
|
1983
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.list_whats_app_group_chats ...'
|
|
1344
1984
|
end
|
|
1345
1985
|
# verify the required parameter 'account_id' is set
|
|
1346
1986
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
1347
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.
|
|
1987
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.list_whats_app_group_chats"
|
|
1988
|
+
end
|
|
1989
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1024
|
|
1990
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WhatsAppApi.list_whats_app_group_chats, must be smaller than or equal to 1024.'
|
|
1348
1991
|
end
|
|
1992
|
+
|
|
1349
1993
|
# resource path
|
|
1350
|
-
local_var_path = '/v1/whatsapp/
|
|
1994
|
+
local_var_path = '/v1/whatsapp/wa-groups'
|
|
1351
1995
|
|
|
1352
1996
|
# query parameters
|
|
1353
1997
|
query_params = opts[:query_params] || {}
|
|
1354
1998
|
query_params[:'accountId'] = account_id
|
|
1999
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2000
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
1355
2001
|
|
|
1356
2002
|
# header parameters
|
|
1357
2003
|
header_params = opts[:header_params] || {}
|
|
@@ -1365,13 +2011,13 @@ module Late
|
|
|
1365
2011
|
post_body = opts[:debug_body]
|
|
1366
2012
|
|
|
1367
2013
|
# return_type
|
|
1368
|
-
return_type = opts[:debug_return_type] || '
|
|
2014
|
+
return_type = opts[:debug_return_type] || 'ListWhatsAppGroupChats200Response'
|
|
1369
2015
|
|
|
1370
2016
|
# auth_names
|
|
1371
2017
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1372
2018
|
|
|
1373
2019
|
new_options = opts.merge(
|
|
1374
|
-
:operation => :"WhatsAppApi.
|
|
2020
|
+
:operation => :"WhatsAppApi.list_whats_app_group_chats",
|
|
1375
2021
|
:header_params => header_params,
|
|
1376
2022
|
:query_params => query_params,
|
|
1377
2023
|
:form_params => form_params,
|
|
@@ -1382,36 +2028,42 @@ module Late
|
|
|
1382
2028
|
|
|
1383
2029
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1384
2030
|
if @api_client.config.debugging
|
|
1385
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
2031
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#list_whats_app_group_chats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1386
2032
|
end
|
|
1387
2033
|
return data, status_code, headers
|
|
1388
2034
|
end
|
|
1389
2035
|
|
|
1390
|
-
# List
|
|
1391
|
-
# List
|
|
2036
|
+
# List join requests
|
|
2037
|
+
# List pending join requests for a WhatsApp group (only for groups with approval_required mode).
|
|
2038
|
+
# @param group_id [String] Group ID
|
|
1392
2039
|
# @param account_id [String] WhatsApp social account ID
|
|
1393
2040
|
# @param [Hash] opts the optional parameters
|
|
1394
|
-
# @return [
|
|
1395
|
-
def
|
|
1396
|
-
data, _status_code, _headers =
|
|
2041
|
+
# @return [ListWhatsAppGroupJoinRequests200Response]
|
|
2042
|
+
def list_whats_app_group_join_requests(group_id, account_id, opts = {})
|
|
2043
|
+
data, _status_code, _headers = list_whats_app_group_join_requests_with_http_info(group_id, account_id, opts)
|
|
1397
2044
|
data
|
|
1398
2045
|
end
|
|
1399
2046
|
|
|
1400
|
-
# List
|
|
1401
|
-
# List
|
|
2047
|
+
# List join requests
|
|
2048
|
+
# List pending join requests for a WhatsApp group (only for groups with approval_required mode).
|
|
2049
|
+
# @param group_id [String] Group ID
|
|
1402
2050
|
# @param account_id [String] WhatsApp social account ID
|
|
1403
2051
|
# @param [Hash] opts the optional parameters
|
|
1404
|
-
# @return [Array<(
|
|
1405
|
-
def
|
|
2052
|
+
# @return [Array<(ListWhatsAppGroupJoinRequests200Response, Integer, Hash)>] ListWhatsAppGroupJoinRequests200Response data, response status code and response headers
|
|
2053
|
+
def list_whats_app_group_join_requests_with_http_info(group_id, account_id, opts = {})
|
|
1406
2054
|
if @api_client.config.debugging
|
|
1407
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
2055
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.list_whats_app_group_join_requests ...'
|
|
2056
|
+
end
|
|
2057
|
+
# verify the required parameter 'group_id' is set
|
|
2058
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
2059
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.list_whats_app_group_join_requests"
|
|
1408
2060
|
end
|
|
1409
2061
|
# verify the required parameter 'account_id' is set
|
|
1410
2062
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
1411
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.
|
|
2063
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.list_whats_app_group_join_requests"
|
|
1412
2064
|
end
|
|
1413
2065
|
# resource path
|
|
1414
|
-
local_var_path = '/v1/whatsapp/
|
|
2066
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/join-requests'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
1415
2067
|
|
|
1416
2068
|
# query parameters
|
|
1417
2069
|
query_params = opts[:query_params] || {}
|
|
@@ -1429,13 +2081,13 @@ module Late
|
|
|
1429
2081
|
post_body = opts[:debug_body]
|
|
1430
2082
|
|
|
1431
2083
|
# return_type
|
|
1432
|
-
return_type = opts[:debug_return_type] || '
|
|
2084
|
+
return_type = opts[:debug_return_type] || 'ListWhatsAppGroupJoinRequests200Response'
|
|
1433
2085
|
|
|
1434
2086
|
# auth_names
|
|
1435
2087
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1436
2088
|
|
|
1437
2089
|
new_options = opts.merge(
|
|
1438
|
-
:operation => :"WhatsAppApi.
|
|
2090
|
+
:operation => :"WhatsAppApi.list_whats_app_group_join_requests",
|
|
1439
2091
|
:header_params => header_params,
|
|
1440
2092
|
:query_params => query_params,
|
|
1441
2093
|
:form_params => form_params,
|
|
@@ -1446,39 +2098,52 @@ module Late
|
|
|
1446
2098
|
|
|
1447
2099
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1448
2100
|
if @api_client.config.debugging
|
|
1449
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
2101
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#list_whats_app_group_join_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1450
2102
|
end
|
|
1451
2103
|
return data, status_code, headers
|
|
1452
2104
|
end
|
|
1453
2105
|
|
|
1454
|
-
#
|
|
1455
|
-
#
|
|
1456
|
-
# @param
|
|
2106
|
+
# Reject join requests
|
|
2107
|
+
# Reject pending join requests for a WhatsApp group.
|
|
2108
|
+
# @param group_id [String] Group ID
|
|
2109
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2110
|
+
# @param reject_whats_app_group_join_requests_request [RejectWhatsAppGroupJoinRequestsRequest]
|
|
1457
2111
|
# @param [Hash] opts the optional parameters
|
|
1458
|
-
# @return [
|
|
1459
|
-
def
|
|
1460
|
-
data, _status_code, _headers =
|
|
2112
|
+
# @return [UnpublishPost200Response]
|
|
2113
|
+
def reject_whats_app_group_join_requests(group_id, account_id, reject_whats_app_group_join_requests_request, opts = {})
|
|
2114
|
+
data, _status_code, _headers = reject_whats_app_group_join_requests_with_http_info(group_id, account_id, reject_whats_app_group_join_requests_request, opts)
|
|
1461
2115
|
data
|
|
1462
2116
|
end
|
|
1463
2117
|
|
|
1464
|
-
#
|
|
1465
|
-
#
|
|
1466
|
-
# @param
|
|
2118
|
+
# Reject join requests
|
|
2119
|
+
# Reject pending join requests for a WhatsApp group.
|
|
2120
|
+
# @param group_id [String] Group ID
|
|
2121
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2122
|
+
# @param reject_whats_app_group_join_requests_request [RejectWhatsAppGroupJoinRequestsRequest]
|
|
1467
2123
|
# @param [Hash] opts the optional parameters
|
|
1468
|
-
# @return [Array<(
|
|
1469
|
-
def
|
|
2124
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
2125
|
+
def reject_whats_app_group_join_requests_with_http_info(group_id, account_id, reject_whats_app_group_join_requests_request, opts = {})
|
|
1470
2126
|
if @api_client.config.debugging
|
|
1471
|
-
@api_client.config.logger.debug 'Calling API: WhatsAppApi.
|
|
2127
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.reject_whats_app_group_join_requests ...'
|
|
1472
2128
|
end
|
|
1473
|
-
# verify the required parameter '
|
|
1474
|
-
if @api_client.config.client_side_validation &&
|
|
1475
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2129
|
+
# verify the required parameter 'group_id' is set
|
|
2130
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
2131
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.reject_whats_app_group_join_requests"
|
|
2132
|
+
end
|
|
2133
|
+
# verify the required parameter 'account_id' is set
|
|
2134
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2135
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.reject_whats_app_group_join_requests"
|
|
2136
|
+
end
|
|
2137
|
+
# verify the required parameter 'reject_whats_app_group_join_requests_request' is set
|
|
2138
|
+
if @api_client.config.client_side_validation && reject_whats_app_group_join_requests_request.nil?
|
|
2139
|
+
fail ArgumentError, "Missing the required parameter 'reject_whats_app_group_join_requests_request' when calling WhatsAppApi.reject_whats_app_group_join_requests"
|
|
1476
2140
|
end
|
|
1477
2141
|
# resource path
|
|
1478
|
-
local_var_path = '/v1/whatsapp/
|
|
2142
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/join-requests'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
1479
2143
|
|
|
1480
2144
|
# query parameters
|
|
1481
2145
|
query_params = opts[:query_params] || {}
|
|
2146
|
+
query_params[:'accountId'] = account_id
|
|
1482
2147
|
|
|
1483
2148
|
# header parameters
|
|
1484
2149
|
header_params = opts[:header_params] || {}
|
|
@@ -1494,16 +2159,16 @@ module Late
|
|
|
1494
2159
|
form_params = opts[:form_params] || {}
|
|
1495
2160
|
|
|
1496
2161
|
# http body (model)
|
|
1497
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2162
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reject_whats_app_group_join_requests_request)
|
|
1498
2163
|
|
|
1499
2164
|
# return_type
|
|
1500
|
-
return_type = opts[:debug_return_type] || '
|
|
2165
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
1501
2166
|
|
|
1502
2167
|
# auth_names
|
|
1503
2168
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1504
2169
|
|
|
1505
2170
|
new_options = opts.merge(
|
|
1506
|
-
:operation => :"WhatsAppApi.
|
|
2171
|
+
:operation => :"WhatsAppApi.reject_whats_app_group_join_requests",
|
|
1507
2172
|
:header_params => header_params,
|
|
1508
2173
|
:query_params => query_params,
|
|
1509
2174
|
:form_params => form_params,
|
|
@@ -1512,9 +2177,9 @@ module Late
|
|
|
1512
2177
|
:return_type => return_type
|
|
1513
2178
|
)
|
|
1514
2179
|
|
|
1515
|
-
data, status_code, headers = @api_client.call_api(:
|
|
2180
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1516
2181
|
if @api_client.config.debugging
|
|
1517
|
-
@api_client.config.logger.debug "API called: WhatsAppApi#
|
|
2182
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#reject_whats_app_group_join_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1518
2183
|
end
|
|
1519
2184
|
return data, status_code, headers
|
|
1520
2185
|
end
|
|
@@ -1593,6 +2258,87 @@ module Late
|
|
|
1593
2258
|
return data, status_code, headers
|
|
1594
2259
|
end
|
|
1595
2260
|
|
|
2261
|
+
# Remove participants
|
|
2262
|
+
# Remove participants from a WhatsApp group.
|
|
2263
|
+
# @param group_id [String] Group ID
|
|
2264
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2265
|
+
# @param remove_whats_app_group_participants_request [RemoveWhatsAppGroupParticipantsRequest]
|
|
2266
|
+
# @param [Hash] opts the optional parameters
|
|
2267
|
+
# @return [UnpublishPost200Response]
|
|
2268
|
+
def remove_whats_app_group_participants(group_id, account_id, remove_whats_app_group_participants_request, opts = {})
|
|
2269
|
+
data, _status_code, _headers = remove_whats_app_group_participants_with_http_info(group_id, account_id, remove_whats_app_group_participants_request, opts)
|
|
2270
|
+
data
|
|
2271
|
+
end
|
|
2272
|
+
|
|
2273
|
+
# Remove participants
|
|
2274
|
+
# Remove participants from a WhatsApp group.
|
|
2275
|
+
# @param group_id [String] Group ID
|
|
2276
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2277
|
+
# @param remove_whats_app_group_participants_request [RemoveWhatsAppGroupParticipantsRequest]
|
|
2278
|
+
# @param [Hash] opts the optional parameters
|
|
2279
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
2280
|
+
def remove_whats_app_group_participants_with_http_info(group_id, account_id, remove_whats_app_group_participants_request, opts = {})
|
|
2281
|
+
if @api_client.config.debugging
|
|
2282
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.remove_whats_app_group_participants ...'
|
|
2283
|
+
end
|
|
2284
|
+
# verify the required parameter 'group_id' is set
|
|
2285
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
2286
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.remove_whats_app_group_participants"
|
|
2287
|
+
end
|
|
2288
|
+
# verify the required parameter 'account_id' is set
|
|
2289
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2290
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.remove_whats_app_group_participants"
|
|
2291
|
+
end
|
|
2292
|
+
# verify the required parameter 'remove_whats_app_group_participants_request' is set
|
|
2293
|
+
if @api_client.config.client_side_validation && remove_whats_app_group_participants_request.nil?
|
|
2294
|
+
fail ArgumentError, "Missing the required parameter 'remove_whats_app_group_participants_request' when calling WhatsAppApi.remove_whats_app_group_participants"
|
|
2295
|
+
end
|
|
2296
|
+
# resource path
|
|
2297
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}/participants'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
2298
|
+
|
|
2299
|
+
# query parameters
|
|
2300
|
+
query_params = opts[:query_params] || {}
|
|
2301
|
+
query_params[:'accountId'] = account_id
|
|
2302
|
+
|
|
2303
|
+
# header parameters
|
|
2304
|
+
header_params = opts[:header_params] || {}
|
|
2305
|
+
# HTTP header 'Accept' (if needed)
|
|
2306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2307
|
+
# HTTP header 'Content-Type'
|
|
2308
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2309
|
+
if !content_type.nil?
|
|
2310
|
+
header_params['Content-Type'] = content_type
|
|
2311
|
+
end
|
|
2312
|
+
|
|
2313
|
+
# form parameters
|
|
2314
|
+
form_params = opts[:form_params] || {}
|
|
2315
|
+
|
|
2316
|
+
# http body (model)
|
|
2317
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_whats_app_group_participants_request)
|
|
2318
|
+
|
|
2319
|
+
# return_type
|
|
2320
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
2321
|
+
|
|
2322
|
+
# auth_names
|
|
2323
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2324
|
+
|
|
2325
|
+
new_options = opts.merge(
|
|
2326
|
+
:operation => :"WhatsAppApi.remove_whats_app_group_participants",
|
|
2327
|
+
:header_params => header_params,
|
|
2328
|
+
:query_params => query_params,
|
|
2329
|
+
:form_params => form_params,
|
|
2330
|
+
:body => post_body,
|
|
2331
|
+
:auth_names => auth_names,
|
|
2332
|
+
:return_type => return_type
|
|
2333
|
+
)
|
|
2334
|
+
|
|
2335
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2336
|
+
if @api_client.config.debugging
|
|
2337
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#remove_whats_app_group_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2338
|
+
end
|
|
2339
|
+
return data, status_code, headers
|
|
2340
|
+
end
|
|
2341
|
+
|
|
1596
2342
|
# Rename group
|
|
1597
2343
|
# **Deprecated.** Use contact tags via `PATCH /v1/contacts/{id}` instead. Rename a contact group. This updates the group name on all contacts that belong to the group.
|
|
1598
2344
|
# @param rename_whats_app_group_request [RenameWhatsAppGroupRequest]
|
|
@@ -2076,6 +2822,87 @@ module Late
|
|
|
2076
2822
|
return data, status_code, headers
|
|
2077
2823
|
end
|
|
2078
2824
|
|
|
2825
|
+
# Update group settings
|
|
2826
|
+
# Update the subject, description, or join approval mode of a WhatsApp group.
|
|
2827
|
+
# @param group_id [String] Group ID
|
|
2828
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2829
|
+
# @param update_whats_app_group_chat_request [UpdateWhatsAppGroupChatRequest]
|
|
2830
|
+
# @param [Hash] opts the optional parameters
|
|
2831
|
+
# @return [UnpublishPost200Response]
|
|
2832
|
+
def update_whats_app_group_chat(group_id, account_id, update_whats_app_group_chat_request, opts = {})
|
|
2833
|
+
data, _status_code, _headers = update_whats_app_group_chat_with_http_info(group_id, account_id, update_whats_app_group_chat_request, opts)
|
|
2834
|
+
data
|
|
2835
|
+
end
|
|
2836
|
+
|
|
2837
|
+
# Update group settings
|
|
2838
|
+
# Update the subject, description, or join approval mode of a WhatsApp group.
|
|
2839
|
+
# @param group_id [String] Group ID
|
|
2840
|
+
# @param account_id [String] WhatsApp social account ID
|
|
2841
|
+
# @param update_whats_app_group_chat_request [UpdateWhatsAppGroupChatRequest]
|
|
2842
|
+
# @param [Hash] opts the optional parameters
|
|
2843
|
+
# @return [Array<(UnpublishPost200Response, Integer, Hash)>] UnpublishPost200Response data, response status code and response headers
|
|
2844
|
+
def update_whats_app_group_chat_with_http_info(group_id, account_id, update_whats_app_group_chat_request, opts = {})
|
|
2845
|
+
if @api_client.config.debugging
|
|
2846
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.update_whats_app_group_chat ...'
|
|
2847
|
+
end
|
|
2848
|
+
# verify the required parameter 'group_id' is set
|
|
2849
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
2850
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling WhatsAppApi.update_whats_app_group_chat"
|
|
2851
|
+
end
|
|
2852
|
+
# verify the required parameter 'account_id' is set
|
|
2853
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2854
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.update_whats_app_group_chat"
|
|
2855
|
+
end
|
|
2856
|
+
# verify the required parameter 'update_whats_app_group_chat_request' is set
|
|
2857
|
+
if @api_client.config.client_side_validation && update_whats_app_group_chat_request.nil?
|
|
2858
|
+
fail ArgumentError, "Missing the required parameter 'update_whats_app_group_chat_request' when calling WhatsAppApi.update_whats_app_group_chat"
|
|
2859
|
+
end
|
|
2860
|
+
# resource path
|
|
2861
|
+
local_var_path = '/v1/whatsapp/wa-groups/{groupId}'.sub('{' + 'groupId' + '}', CGI.escape(group_id.to_s))
|
|
2862
|
+
|
|
2863
|
+
# query parameters
|
|
2864
|
+
query_params = opts[:query_params] || {}
|
|
2865
|
+
query_params[:'accountId'] = account_id
|
|
2866
|
+
|
|
2867
|
+
# header parameters
|
|
2868
|
+
header_params = opts[:header_params] || {}
|
|
2869
|
+
# HTTP header 'Accept' (if needed)
|
|
2870
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2871
|
+
# HTTP header 'Content-Type'
|
|
2872
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2873
|
+
if !content_type.nil?
|
|
2874
|
+
header_params['Content-Type'] = content_type
|
|
2875
|
+
end
|
|
2876
|
+
|
|
2877
|
+
# form parameters
|
|
2878
|
+
form_params = opts[:form_params] || {}
|
|
2879
|
+
|
|
2880
|
+
# http body (model)
|
|
2881
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_whats_app_group_chat_request)
|
|
2882
|
+
|
|
2883
|
+
# return_type
|
|
2884
|
+
return_type = opts[:debug_return_type] || 'UnpublishPost200Response'
|
|
2885
|
+
|
|
2886
|
+
# auth_names
|
|
2887
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2888
|
+
|
|
2889
|
+
new_options = opts.merge(
|
|
2890
|
+
:operation => :"WhatsAppApi.update_whats_app_group_chat",
|
|
2891
|
+
:header_params => header_params,
|
|
2892
|
+
:query_params => query_params,
|
|
2893
|
+
:form_params => form_params,
|
|
2894
|
+
:body => post_body,
|
|
2895
|
+
:auth_names => auth_names,
|
|
2896
|
+
:return_type => return_type
|
|
2897
|
+
)
|
|
2898
|
+
|
|
2899
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2900
|
+
if @api_client.config.debugging
|
|
2901
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#update_whats_app_group_chat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2902
|
+
end
|
|
2903
|
+
return data, status_code, headers
|
|
2904
|
+
end
|
|
2905
|
+
|
|
2079
2906
|
# Update template
|
|
2080
2907
|
# Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.
|
|
2081
2908
|
# @param template_name [String] Template name
|