late-sdk 0.0.790 → 0.0.792
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 +10 -0
- data/docs/DeleteWhatsAppTemplate200Response.md +24 -0
- data/docs/DeleteWhatsAppTemplateById200Response.md +24 -0
- data/docs/GetWhatsAppTemplate200ResponseTemplate.md +7 -3
- data/docs/GetWhatsAppTemplate409Response.md +26 -0
- data/docs/GetWhatsAppTemplate409ResponseDetails.md +18 -0
- data/docs/LinkedInMentionsApi.md +1 -1
- data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +3 -1
- data/docs/UpdateWhatsAppTemplateById200Response.md +20 -0
- data/docs/UpdateWhatsAppTemplateById200ResponseTemplate.md +24 -0
- data/docs/UpdateWhatsAppTemplateByIdRequest.md +20 -0
- data/docs/UpdateWhatsAppTemplateRequest.md +2 -0
- data/docs/WhatsAppApi.md +256 -24
- data/lib/zernio-sdk/api/linked_in_mentions_api.rb +2 -2
- data/lib/zernio-sdk/api/whats_app_api.rb +250 -17
- data/lib/zernio-sdk/models/delete_whats_app_template200_response.rb +210 -0
- data/lib/zernio-sdk/models/delete_whats_app_template_by_id200_response.rb +208 -0
- data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +26 -4
- data/lib/zernio-sdk/models/get_whats_app_template409_response.rb +241 -0
- data/lib/zernio-sdk/models/get_whats_app_template409_response_details.rb +149 -0
- data/lib/zernio-sdk/models/update_whats_app_template200_response_template.rb +12 -1
- data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response.rb +156 -0
- data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response_template.rb +175 -0
- data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +203 -0
- data/lib/zernio-sdk/models/update_whats_app_template_request.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +7 -0
- data/openapi.yaml +288 -36
- data/spec/api/linked_in_mentions_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +52 -8
- data/spec/models/delete_whats_app_template200_response_spec.rb +58 -0
- data/spec/models/delete_whats_app_template_by_id200_response_spec.rb +58 -0
- data/spec/models/get_whats_app_template200_response_template_spec.rb +12 -0
- data/spec/models/get_whats_app_template409_response_details_spec.rb +36 -0
- data/spec/models/get_whats_app_template409_response_spec.rb +72 -0
- data/spec/models/update_whats_app_template200_response_template_spec.rb +6 -0
- data/spec/models/update_whats_app_template_by_id200_response_spec.rb +42 -0
- data/spec/models/update_whats_app_template_by_id200_response_template_spec.rb +54 -0
- data/spec/models/update_whats_app_template_by_id_request_spec.rb +42 -0
- data/spec/models/update_whats_app_template_request_spec.rb +6 -0
- data/zernio-sdk-0.0.792.gem +0 -0
- metadata +31 -3
- data/zernio-sdk-0.0.790.gem +0 -0
data/docs/WhatsAppApi.md
CHANGED
|
@@ -13,6 +13,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
13
13
|
| [**create_whats_app_template**](WhatsAppApi.md#create_whats_app_template) | **POST** /v1/whatsapp/templates | Create template |
|
|
14
14
|
| [**delete_whats_app_group_chat**](WhatsAppApi.md#delete_whats_app_group_chat) | **DELETE** /v1/whatsapp/wa-groups/{groupId} | Delete group |
|
|
15
15
|
| [**delete_whats_app_template**](WhatsAppApi.md#delete_whats_app_template) | **DELETE** /v1/whatsapp/templates/{templateName} | Delete template |
|
|
16
|
+
| [**delete_whats_app_template_by_id**](WhatsAppApi.md#delete_whats_app_template_by_id) | **DELETE** /v1/whatsapp/templates/id/{templateId} | Delete template by id |
|
|
16
17
|
| [**delete_whatsapp_business_username**](WhatsAppApi.md#delete_whatsapp_business_username) | **DELETE** /v1/whatsapp/business-profile/username | Delete business username |
|
|
17
18
|
| [**get_whats_app_block_status**](WhatsAppApi.md#get_whats_app_block_status) | **GET** /v1/whatsapp/block-users/status | Check if a user is blocked |
|
|
18
19
|
| [**get_whats_app_blocked_users**](WhatsAppApi.md#get_whats_app_blocked_users) | **GET** /v1/whatsapp/block-users | List blocked users |
|
|
@@ -22,6 +23,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
22
23
|
| [**get_whats_app_group_chat**](WhatsAppApi.md#get_whats_app_group_chat) | **GET** /v1/whatsapp/wa-groups/{groupId} | Get group info |
|
|
23
24
|
| [**get_whats_app_media**](WhatsAppApi.md#get_whats_app_media) | **GET** /v1/whatsapp/media/{mediaId} | Download WhatsApp media |
|
|
24
25
|
| [**get_whats_app_template**](WhatsAppApi.md#get_whats_app_template) | **GET** /v1/whatsapp/templates/{templateName} | Get template |
|
|
26
|
+
| [**get_whats_app_template_by_id**](WhatsAppApi.md#get_whats_app_template_by_id) | **GET** /v1/whatsapp/templates/id/{templateId} | Get template by id |
|
|
25
27
|
| [**get_whats_app_templates**](WhatsAppApi.md#get_whats_app_templates) | **GET** /v1/whatsapp/templates | List templates |
|
|
26
28
|
| [**get_whatsapp_business_username**](WhatsAppApi.md#get_whatsapp_business_username) | **GET** /v1/whatsapp/business-profile/username | Get business username |
|
|
27
29
|
| [**get_whatsapp_business_username_suggestions**](WhatsAppApi.md#get_whatsapp_business_username_suggestions) | **GET** /v1/whatsapp/business-profile/username/suggestions | Get username suggestions |
|
|
@@ -39,6 +41,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
39
41
|
| [**update_whats_app_display_name**](WhatsAppApi.md#update_whats_app_display_name) | **POST** /v1/whatsapp/business-profile/display-name | Request display name change |
|
|
40
42
|
| [**update_whats_app_group_chat**](WhatsAppApi.md#update_whats_app_group_chat) | **POST** /v1/whatsapp/wa-groups/{groupId} | Update group settings |
|
|
41
43
|
| [**update_whats_app_template**](WhatsAppApi.md#update_whats_app_template) | **PATCH** /v1/whatsapp/templates/{templateName} | Update template |
|
|
44
|
+
| [**update_whats_app_template_by_id**](WhatsAppApi.md#update_whats_app_template_by_id) | **PATCH** /v1/whatsapp/templates/id/{templateId} | Update template by id |
|
|
42
45
|
| [**upload_whats_app_profile_photo**](WhatsAppApi.md#upload_whats_app_profile_photo) | **POST** /v1/whatsapp/business-profile/photo | Upload profile picture |
|
|
43
46
|
|
|
44
47
|
|
|
@@ -608,11 +611,11 @@ end
|
|
|
608
611
|
|
|
609
612
|
## delete_whats_app_template
|
|
610
613
|
|
|
611
|
-
> <
|
|
614
|
+
> <DeleteWhatsAppTemplate200Response> delete_whats_app_template(template_name, account_id, opts)
|
|
612
615
|
|
|
613
616
|
Delete template
|
|
614
617
|
|
|
615
|
-
Permanently delete a message template by name.
|
|
618
|
+
Permanently delete a message template. **Without `language` this deletes every language variant of the name** (Meta's own contract for deletion by name). Pass `language` to delete one variant only; the response `scope` says which happened. Meta keeps a deleted approved template in `PENDING_DELETION` for a while and the name cannot be reused for 30 days.
|
|
616
619
|
|
|
617
620
|
### Examples
|
|
618
621
|
|
|
@@ -626,12 +629,15 @@ Zernio.configure do |config|
|
|
|
626
629
|
end
|
|
627
630
|
|
|
628
631
|
api_instance = Zernio::WhatsAppApi.new
|
|
629
|
-
template_name = 'template_name_example' # String | Template name
|
|
632
|
+
template_name = 'template_name_example' # String | Template name (the family).
|
|
630
633
|
account_id = 'account_id_example' # String | WhatsApp social account ID
|
|
634
|
+
opts = {
|
|
635
|
+
language: 'language_example' # String | Delete only this language variant (e.g. es). Omit to delete the whole family.
|
|
636
|
+
}
|
|
631
637
|
|
|
632
638
|
begin
|
|
633
639
|
# Delete template
|
|
634
|
-
result = api_instance.delete_whats_app_template(template_name, account_id)
|
|
640
|
+
result = api_instance.delete_whats_app_template(template_name, account_id, opts)
|
|
635
641
|
p result
|
|
636
642
|
rescue Zernio::ApiError => e
|
|
637
643
|
puts "Error when calling WhatsAppApi->delete_whats_app_template: #{e}"
|
|
@@ -642,15 +648,15 @@ end
|
|
|
642
648
|
|
|
643
649
|
This returns an Array which contains the response data, status code and headers.
|
|
644
650
|
|
|
645
|
-
> <Array(<
|
|
651
|
+
> <Array(<DeleteWhatsAppTemplate200Response>, Integer, Hash)> delete_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
646
652
|
|
|
647
653
|
```ruby
|
|
648
654
|
begin
|
|
649
655
|
# Delete template
|
|
650
|
-
data, status_code, headers = api_instance.delete_whats_app_template_with_http_info(template_name, account_id)
|
|
656
|
+
data, status_code, headers = api_instance.delete_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
651
657
|
p status_code # => 2xx
|
|
652
658
|
p headers # => { ... }
|
|
653
|
-
p data # => <
|
|
659
|
+
p data # => <DeleteWhatsAppTemplate200Response>
|
|
654
660
|
rescue Zernio::ApiError => e
|
|
655
661
|
puts "Error when calling WhatsAppApi->delete_whats_app_template_with_http_info: #{e}"
|
|
656
662
|
end
|
|
@@ -660,12 +666,84 @@ end
|
|
|
660
666
|
|
|
661
667
|
| Name | Type | Description | Notes |
|
|
662
668
|
| ---- | ---- | ----------- | ----- |
|
|
663
|
-
| **template_name** | **String** | Template name | |
|
|
669
|
+
| **template_name** | **String** | Template name (the family). | |
|
|
664
670
|
| **account_id** | **String** | WhatsApp social account ID | |
|
|
671
|
+
| **language** | **String** | Delete only this language variant (e.g. es). Omit to delete the whole family. | [optional] |
|
|
665
672
|
|
|
666
673
|
### Return type
|
|
667
674
|
|
|
668
|
-
[**
|
|
675
|
+
[**DeleteWhatsAppTemplate200Response**](DeleteWhatsAppTemplate200Response.md)
|
|
676
|
+
|
|
677
|
+
### Authorization
|
|
678
|
+
|
|
679
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
680
|
+
|
|
681
|
+
### HTTP request headers
|
|
682
|
+
|
|
683
|
+
- **Content-Type**: Not defined
|
|
684
|
+
- **Accept**: application/json
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
## delete_whats_app_template_by_id
|
|
688
|
+
|
|
689
|
+
> <DeleteWhatsAppTemplateById200Response> delete_whats_app_template_by_id(template_id, account_id)
|
|
690
|
+
|
|
691
|
+
Delete template by id
|
|
692
|
+
|
|
693
|
+
Delete one language variant by its Meta id. Other languages of the same name are untouched. The name cannot be reused for 30 days once its last variant is deleted.
|
|
694
|
+
|
|
695
|
+
### Examples
|
|
696
|
+
|
|
697
|
+
```ruby
|
|
698
|
+
require 'time'
|
|
699
|
+
require 'zernio-sdk'
|
|
700
|
+
# setup authorization
|
|
701
|
+
Zernio.configure do |config|
|
|
702
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
703
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
707
|
+
template_id = 'template_id_example' # String | Meta template id (numeric).
|
|
708
|
+
account_id = 'account_id_example' # String | WhatsApp social account ID
|
|
709
|
+
|
|
710
|
+
begin
|
|
711
|
+
# Delete template by id
|
|
712
|
+
result = api_instance.delete_whats_app_template_by_id(template_id, account_id)
|
|
713
|
+
p result
|
|
714
|
+
rescue Zernio::ApiError => e
|
|
715
|
+
puts "Error when calling WhatsAppApi->delete_whats_app_template_by_id: #{e}"
|
|
716
|
+
end
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
#### Using the delete_whats_app_template_by_id_with_http_info variant
|
|
720
|
+
|
|
721
|
+
This returns an Array which contains the response data, status code and headers.
|
|
722
|
+
|
|
723
|
+
> <Array(<DeleteWhatsAppTemplateById200Response>, Integer, Hash)> delete_whats_app_template_by_id_with_http_info(template_id, account_id)
|
|
724
|
+
|
|
725
|
+
```ruby
|
|
726
|
+
begin
|
|
727
|
+
# Delete template by id
|
|
728
|
+
data, status_code, headers = api_instance.delete_whats_app_template_by_id_with_http_info(template_id, account_id)
|
|
729
|
+
p status_code # => 2xx
|
|
730
|
+
p headers # => { ... }
|
|
731
|
+
p data # => <DeleteWhatsAppTemplateById200Response>
|
|
732
|
+
rescue Zernio::ApiError => e
|
|
733
|
+
puts "Error when calling WhatsAppApi->delete_whats_app_template_by_id_with_http_info: #{e}"
|
|
734
|
+
end
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
### Parameters
|
|
738
|
+
|
|
739
|
+
| Name | Type | Description | Notes |
|
|
740
|
+
| ---- | ---- | ----------- | ----- |
|
|
741
|
+
| **template_id** | **String** | Meta template id (numeric). | |
|
|
742
|
+
| **account_id** | **String** | WhatsApp social account ID | |
|
|
743
|
+
|
|
744
|
+
### Return type
|
|
745
|
+
|
|
746
|
+
[**DeleteWhatsAppTemplateById200Response**](DeleteWhatsAppTemplateById200Response.md)
|
|
669
747
|
|
|
670
748
|
### Authorization
|
|
671
749
|
|
|
@@ -1243,11 +1321,11 @@ end
|
|
|
1243
1321
|
|
|
1244
1322
|
## get_whats_app_template
|
|
1245
1323
|
|
|
1246
|
-
> <GetWhatsAppTemplate200Response> get_whats_app_template(template_name, account_id)
|
|
1324
|
+
> <GetWhatsAppTemplate200Response> get_whats_app_template(template_name, account_id, opts)
|
|
1247
1325
|
|
|
1248
1326
|
Get template
|
|
1249
1327
|
|
|
1250
|
-
Retrieve
|
|
1328
|
+
Retrieve one message template variant by name. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family.
|
|
1251
1329
|
|
|
1252
1330
|
### Examples
|
|
1253
1331
|
|
|
@@ -1261,12 +1339,15 @@ Zernio.configure do |config|
|
|
|
1261
1339
|
end
|
|
1262
1340
|
|
|
1263
1341
|
api_instance = Zernio::WhatsAppApi.new
|
|
1264
|
-
template_name = 'template_name_example' # String | Template name
|
|
1342
|
+
template_name = 'template_name_example' # String | Template name (the family).
|
|
1265
1343
|
account_id = 'account_id_example' # String | WhatsApp social account ID
|
|
1344
|
+
opts = {
|
|
1345
|
+
language: 'language_example' # String | Language code of the variant (e.g. en_US, es, pt_BR). Required when the family has several languages.
|
|
1346
|
+
}
|
|
1266
1347
|
|
|
1267
1348
|
begin
|
|
1268
1349
|
# Get template
|
|
1269
|
-
result = api_instance.get_whats_app_template(template_name, account_id)
|
|
1350
|
+
result = api_instance.get_whats_app_template(template_name, account_id, opts)
|
|
1270
1351
|
p result
|
|
1271
1352
|
rescue Zernio::ApiError => e
|
|
1272
1353
|
puts "Error when calling WhatsAppApi->get_whats_app_template: #{e}"
|
|
@@ -1277,12 +1358,12 @@ end
|
|
|
1277
1358
|
|
|
1278
1359
|
This returns an Array which contains the response data, status code and headers.
|
|
1279
1360
|
|
|
1280
|
-
> <Array(<GetWhatsAppTemplate200Response>, Integer, Hash)> get_whats_app_template_with_http_info(template_name, account_id)
|
|
1361
|
+
> <Array(<GetWhatsAppTemplate200Response>, Integer, Hash)> get_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
1281
1362
|
|
|
1282
1363
|
```ruby
|
|
1283
1364
|
begin
|
|
1284
1365
|
# Get template
|
|
1285
|
-
data, status_code, headers = api_instance.get_whats_app_template_with_http_info(template_name, account_id)
|
|
1366
|
+
data, status_code, headers = api_instance.get_whats_app_template_with_http_info(template_name, account_id, opts)
|
|
1286
1367
|
p status_code # => 2xx
|
|
1287
1368
|
p headers # => { ... }
|
|
1288
1369
|
p data # => <GetWhatsAppTemplate200Response>
|
|
@@ -1295,7 +1376,79 @@ end
|
|
|
1295
1376
|
|
|
1296
1377
|
| Name | Type | Description | Notes |
|
|
1297
1378
|
| ---- | ---- | ----------- | ----- |
|
|
1298
|
-
| **template_name** | **String** | Template name | |
|
|
1379
|
+
| **template_name** | **String** | Template name (the family). | |
|
|
1380
|
+
| **account_id** | **String** | WhatsApp social account ID | |
|
|
1381
|
+
| **language** | **String** | Language code of the variant (e.g. en_US, es, pt_BR). Required when the family has several languages. | [optional] |
|
|
1382
|
+
|
|
1383
|
+
### Return type
|
|
1384
|
+
|
|
1385
|
+
[**GetWhatsAppTemplate200Response**](GetWhatsAppTemplate200Response.md)
|
|
1386
|
+
|
|
1387
|
+
### Authorization
|
|
1388
|
+
|
|
1389
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1390
|
+
|
|
1391
|
+
### HTTP request headers
|
|
1392
|
+
|
|
1393
|
+
- **Content-Type**: Not defined
|
|
1394
|
+
- **Accept**: application/json
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
## get_whats_app_template_by_id
|
|
1398
|
+
|
|
1399
|
+
> <GetWhatsAppTemplate200Response> get_whats_app_template_by_id(template_id, account_id)
|
|
1400
|
+
|
|
1401
|
+
Get template by id
|
|
1402
|
+
|
|
1403
|
+
Retrieve one template variant by its Meta id, the id every variant of a family has on its own and the one the `whatsapp.template.status_updated` webhook carries.
|
|
1404
|
+
|
|
1405
|
+
### Examples
|
|
1406
|
+
|
|
1407
|
+
```ruby
|
|
1408
|
+
require 'time'
|
|
1409
|
+
require 'zernio-sdk'
|
|
1410
|
+
# setup authorization
|
|
1411
|
+
Zernio.configure do |config|
|
|
1412
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1413
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1414
|
+
end
|
|
1415
|
+
|
|
1416
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
1417
|
+
template_id = 'template_id_example' # String | Meta template id (numeric).
|
|
1418
|
+
account_id = 'account_id_example' # String | WhatsApp social account ID
|
|
1419
|
+
|
|
1420
|
+
begin
|
|
1421
|
+
# Get template by id
|
|
1422
|
+
result = api_instance.get_whats_app_template_by_id(template_id, account_id)
|
|
1423
|
+
p result
|
|
1424
|
+
rescue Zernio::ApiError => e
|
|
1425
|
+
puts "Error when calling WhatsAppApi->get_whats_app_template_by_id: #{e}"
|
|
1426
|
+
end
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
#### Using the get_whats_app_template_by_id_with_http_info variant
|
|
1430
|
+
|
|
1431
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1432
|
+
|
|
1433
|
+
> <Array(<GetWhatsAppTemplate200Response>, Integer, Hash)> get_whats_app_template_by_id_with_http_info(template_id, account_id)
|
|
1434
|
+
|
|
1435
|
+
```ruby
|
|
1436
|
+
begin
|
|
1437
|
+
# Get template by id
|
|
1438
|
+
data, status_code, headers = api_instance.get_whats_app_template_by_id_with_http_info(template_id, account_id)
|
|
1439
|
+
p status_code # => 2xx
|
|
1440
|
+
p headers # => { ... }
|
|
1441
|
+
p data # => <GetWhatsAppTemplate200Response>
|
|
1442
|
+
rescue Zernio::ApiError => e
|
|
1443
|
+
puts "Error when calling WhatsAppApi->get_whats_app_template_by_id_with_http_info: #{e}"
|
|
1444
|
+
end
|
|
1445
|
+
```
|
|
1446
|
+
|
|
1447
|
+
### Parameters
|
|
1448
|
+
|
|
1449
|
+
| Name | Type | Description | Notes |
|
|
1450
|
+
| ---- | ---- | ----------- | ----- |
|
|
1451
|
+
| **template_id** | **String** | Meta template id (numeric). | |
|
|
1299
1452
|
| **account_id** | **String** | WhatsApp social account ID | |
|
|
1300
1453
|
|
|
1301
1454
|
### Return type
|
|
@@ -1314,11 +1467,11 @@ end
|
|
|
1314
1467
|
|
|
1315
1468
|
## get_whats_app_templates
|
|
1316
1469
|
|
|
1317
|
-
> <GetWhatsAppTemplates200Response> get_whats_app_templates(account_id)
|
|
1470
|
+
> <GetWhatsAppTemplates200Response> get_whats_app_templates(account_id, opts)
|
|
1318
1471
|
|
|
1319
1472
|
List templates
|
|
1320
1473
|
|
|
1321
|
-
List
|
|
1474
|
+
List message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API. One entry per **name + language**: a multi-language template appears once per language, each with its own Meta `id`.
|
|
1322
1475
|
|
|
1323
1476
|
### Examples
|
|
1324
1477
|
|
|
@@ -1333,10 +1486,15 @@ end
|
|
|
1333
1486
|
|
|
1334
1487
|
api_instance = Zernio::WhatsAppApi.new
|
|
1335
1488
|
account_id = 'account_id_example' # String | WhatsApp social account ID
|
|
1489
|
+
opts = {
|
|
1490
|
+
name: 'name_example', # String | Exact template name; returns every language variant of that family.
|
|
1491
|
+
language: 'language_example', # String | Exact language code (e.g. en_US).
|
|
1492
|
+
status: 'APPROVED' # String |
|
|
1493
|
+
}
|
|
1336
1494
|
|
|
1337
1495
|
begin
|
|
1338
1496
|
# List templates
|
|
1339
|
-
result = api_instance.get_whats_app_templates(account_id)
|
|
1497
|
+
result = api_instance.get_whats_app_templates(account_id, opts)
|
|
1340
1498
|
p result
|
|
1341
1499
|
rescue Zernio::ApiError => e
|
|
1342
1500
|
puts "Error when calling WhatsAppApi->get_whats_app_templates: #{e}"
|
|
@@ -1347,12 +1505,12 @@ end
|
|
|
1347
1505
|
|
|
1348
1506
|
This returns an Array which contains the response data, status code and headers.
|
|
1349
1507
|
|
|
1350
|
-
> <Array(<GetWhatsAppTemplates200Response>, Integer, Hash)> get_whats_app_templates_with_http_info(account_id)
|
|
1508
|
+
> <Array(<GetWhatsAppTemplates200Response>, Integer, Hash)> get_whats_app_templates_with_http_info(account_id, opts)
|
|
1351
1509
|
|
|
1352
1510
|
```ruby
|
|
1353
1511
|
begin
|
|
1354
1512
|
# List templates
|
|
1355
|
-
data, status_code, headers = api_instance.get_whats_app_templates_with_http_info(account_id)
|
|
1513
|
+
data, status_code, headers = api_instance.get_whats_app_templates_with_http_info(account_id, opts)
|
|
1356
1514
|
p status_code # => 2xx
|
|
1357
1515
|
p headers # => { ... }
|
|
1358
1516
|
p data # => <GetWhatsAppTemplates200Response>
|
|
@@ -1366,6 +1524,9 @@ end
|
|
|
1366
1524
|
| Name | Type | Description | Notes |
|
|
1367
1525
|
| ---- | ---- | ----------- | ----- |
|
|
1368
1526
|
| **account_id** | **String** | WhatsApp social account ID | |
|
|
1527
|
+
| **name** | **String** | Exact template name; returns every language variant of that family. | [optional] |
|
|
1528
|
+
| **language** | **String** | Exact language code (e.g. en_US). | [optional] |
|
|
1529
|
+
| **status** | **String** | | [optional] |
|
|
1369
1530
|
|
|
1370
1531
|
### Return type
|
|
1371
1532
|
|
|
@@ -2454,7 +2615,7 @@ end
|
|
|
2454
2615
|
|
|
2455
2616
|
Update template
|
|
2456
2617
|
|
|
2457
|
-
Update
|
|
2618
|
+
Update one variant's components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
2458
2619
|
|
|
2459
2620
|
### Examples
|
|
2460
2621
|
|
|
@@ -2468,7 +2629,7 @@ Zernio.configure do |config|
|
|
|
2468
2629
|
end
|
|
2469
2630
|
|
|
2470
2631
|
api_instance = Zernio::WhatsAppApi.new
|
|
2471
|
-
template_name = 'template_name_example' # String | Template name
|
|
2632
|
+
template_name = 'template_name_example' # String | Template name (the family).
|
|
2472
2633
|
update_whats_app_template_request = Zernio::UpdateWhatsAppTemplateRequest.new({account_id: 'account_id_example', components: [Zernio::WhatsAppBodyComponent.new({type: 'body', text: 'text_example'})]}) # UpdateWhatsAppTemplateRequest |
|
|
2473
2634
|
|
|
2474
2635
|
begin
|
|
@@ -2502,7 +2663,7 @@ end
|
|
|
2502
2663
|
|
|
2503
2664
|
| Name | Type | Description | Notes |
|
|
2504
2665
|
| ---- | ---- | ----------- | ----- |
|
|
2505
|
-
| **template_name** | **String** | Template name | |
|
|
2666
|
+
| **template_name** | **String** | Template name (the family). | |
|
|
2506
2667
|
| **update_whats_app_template_request** | [**UpdateWhatsAppTemplateRequest**](UpdateWhatsAppTemplateRequest.md) | | |
|
|
2507
2668
|
|
|
2508
2669
|
### Return type
|
|
@@ -2519,6 +2680,77 @@ end
|
|
|
2519
2680
|
- **Accept**: application/json
|
|
2520
2681
|
|
|
2521
2682
|
|
|
2683
|
+
## update_whats_app_template_by_id
|
|
2684
|
+
|
|
2685
|
+
> <UpdateWhatsAppTemplateById200Response> update_whats_app_template_by_id(template_id, update_whats_app_template_by_id_request)
|
|
2686
|
+
|
|
2687
|
+
Update template by id
|
|
2688
|
+
|
|
2689
|
+
Update one variant's components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
|
|
2690
|
+
|
|
2691
|
+
### Examples
|
|
2692
|
+
|
|
2693
|
+
```ruby
|
|
2694
|
+
require 'time'
|
|
2695
|
+
require 'zernio-sdk'
|
|
2696
|
+
# setup authorization
|
|
2697
|
+
Zernio.configure do |config|
|
|
2698
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
2699
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2700
|
+
end
|
|
2701
|
+
|
|
2702
|
+
api_instance = Zernio::WhatsAppApi.new
|
|
2703
|
+
template_id = 'template_id_example' # String | Meta template id (numeric).
|
|
2704
|
+
update_whats_app_template_by_id_request = Zernio::UpdateWhatsAppTemplateByIdRequest.new({account_id: 'account_id_example', components: [Zernio::WhatsAppBodyComponent.new({type: 'body', text: 'text_example'})]}) # UpdateWhatsAppTemplateByIdRequest |
|
|
2705
|
+
|
|
2706
|
+
begin
|
|
2707
|
+
# Update template by id
|
|
2708
|
+
result = api_instance.update_whats_app_template_by_id(template_id, update_whats_app_template_by_id_request)
|
|
2709
|
+
p result
|
|
2710
|
+
rescue Zernio::ApiError => e
|
|
2711
|
+
puts "Error when calling WhatsAppApi->update_whats_app_template_by_id: #{e}"
|
|
2712
|
+
end
|
|
2713
|
+
```
|
|
2714
|
+
|
|
2715
|
+
#### Using the update_whats_app_template_by_id_with_http_info variant
|
|
2716
|
+
|
|
2717
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2718
|
+
|
|
2719
|
+
> <Array(<UpdateWhatsAppTemplateById200Response>, Integer, Hash)> update_whats_app_template_by_id_with_http_info(template_id, update_whats_app_template_by_id_request)
|
|
2720
|
+
|
|
2721
|
+
```ruby
|
|
2722
|
+
begin
|
|
2723
|
+
# Update template by id
|
|
2724
|
+
data, status_code, headers = api_instance.update_whats_app_template_by_id_with_http_info(template_id, update_whats_app_template_by_id_request)
|
|
2725
|
+
p status_code # => 2xx
|
|
2726
|
+
p headers # => { ... }
|
|
2727
|
+
p data # => <UpdateWhatsAppTemplateById200Response>
|
|
2728
|
+
rescue Zernio::ApiError => e
|
|
2729
|
+
puts "Error when calling WhatsAppApi->update_whats_app_template_by_id_with_http_info: #{e}"
|
|
2730
|
+
end
|
|
2731
|
+
```
|
|
2732
|
+
|
|
2733
|
+
### Parameters
|
|
2734
|
+
|
|
2735
|
+
| Name | Type | Description | Notes |
|
|
2736
|
+
| ---- | ---- | ----------- | ----- |
|
|
2737
|
+
| **template_id** | **String** | Meta template id (numeric). | |
|
|
2738
|
+
| **update_whats_app_template_by_id_request** | [**UpdateWhatsAppTemplateByIdRequest**](UpdateWhatsAppTemplateByIdRequest.md) | | |
|
|
2739
|
+
|
|
2740
|
+
### Return type
|
|
2741
|
+
|
|
2742
|
+
[**UpdateWhatsAppTemplateById200Response**](UpdateWhatsAppTemplateById200Response.md)
|
|
2743
|
+
|
|
2744
|
+
### Authorization
|
|
2745
|
+
|
|
2746
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
2747
|
+
|
|
2748
|
+
### HTTP request headers
|
|
2749
|
+
|
|
2750
|
+
- **Content-Type**: application/json
|
|
2751
|
+
- **Accept**: application/json
|
|
2752
|
+
|
|
2753
|
+
|
|
2522
2754
|
## upload_whats_app_profile_photo
|
|
2523
2755
|
|
|
2524
2756
|
> <UnpublishPost200Response> upload_whats_app_profile_photo(account_id, file)
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Resolve LinkedIn mention
|
|
23
|
-
# Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization
|
|
23
|
+
# Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization: both endpoints that resolve a profile URL to a member URN take an organization you administer. Organization mentions (e.g. @Microsoft) have no such requirement. - The two are not scoped alike. peopleTypeahead?q=organizationFollowers only returns that organization's followers; vanityUrl?q=vanityUrlAsOrganization does not, and its resolvable set is opaque. A 404 here does not mean the person is unknown to you or unknown to LinkedIn: a live public profile can 404 with no reason given. - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile. - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
|
|
24
24
|
# @param account_id [String] The LinkedIn account ID
|
|
25
25
|
# @param url [String] LinkedIn profile URL, company URL, or vanity name.
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -32,7 +32,7 @@ module Zernio
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Resolve LinkedIn mention
|
|
35
|
-
# Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization
|
|
35
|
+
# Converts a LinkedIn profile or company URL to a URN for @mentions in posts. How to use LinkedIn @mentions (2-step workflow): 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format. 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field. Example: - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong&displayName=Vincent Jong - Returns: mentionFormat: \"@[Vincent Jong](urn:li:person:xxx)\" - Use in post content: \"Great talk with @[Vincent Jong](urn:li:person:xxx) today!\" Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text. Requirements: - Person mentions require the LinkedIn account to be admin of at least one organization: both endpoints that resolve a profile URL to a member URN take an organization you administer. Organization mentions (e.g. @Microsoft) have no such requirement. - The two are not scoped alike. peopleTypeahead?q=organizationFollowers only returns that organization's followers; vanityUrl?q=vanityUrlAsOrganization does not, and its resolvable set is opaque. A 404 here does not mean the person is unknown to you or unknown to LinkedIn: a live public profile can 404 with no reason given. - For person mentions to be clickable, the displayName parameter must exactly match the name shown on their LinkedIn profile. - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
|
|
36
36
|
# @param account_id [String] The LinkedIn account ID
|
|
37
37
|
# @param url [String] LinkedIn profile URL, company URL, or vanity name.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|