messente_api 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -1
- data/docs/AccountBalanceApi.md +161 -0
- data/docs/NumberVerificationApi.md +195 -0
- data/docs/Price.md +24 -0
- data/docs/PriceNetworksInner.md +22 -0
- data/docs/PricingApi.md +167 -0
- data/docs/WhatsApp.md +13 -1
- data/docs/WhatsAppAudio.md +22 -0
- data/docs/WhatsAppDocument.md +26 -0
- data/docs/WhatsAppImage.md +24 -0
- data/docs/WhatsAppParameter.md +5 -1
- data/docs/WhatsAppSticker.md +24 -0
- data/docs/WhatsAppTemplate.md +1 -1
- data/docs/WhatsAppTemplatesApi.md +384 -0
- data/docs/WhatsAppText.md +20 -0
- data/docs/WhatsAppVideo.md +24 -0
- data/docs/WhatsappButtonType.md +15 -0
- data/docs/WhatsappComponentType.md +15 -0
- data/docs/WhatsappCreateTemplateRequest.md +24 -0
- data/docs/WhatsappCreateTemplateResponse.md +22 -0
- data/docs/WhatsappHeaderFormat.md +15 -0
- data/docs/WhatsappListTemplatesResponse.md +20 -0
- data/docs/WhatsappOtpButtonType.md +15 -0
- data/docs/WhatsappPagination.md +22 -0
- data/docs/WhatsappPagingCursors.md +20 -0
- data/docs/WhatsappSupportedApp.md +20 -0
- data/docs/WhatsappTemplateButton.md +30 -0
- data/docs/WhatsappTemplateCategory.md +15 -0
- data/docs/WhatsappTemplateComponent.md +26 -0
- data/docs/WhatsappTemplateExample.md +20 -0
- data/docs/WhatsappTemplateResponse.md +28 -0
- data/docs/WhatsappTemplateStatus.md +15 -0
- data/docs/WhatsappUpdateTemplateRequest.md +20 -0
- data/lib/messente_api/api/account_balance_api.rb +160 -0
- data/lib/messente_api/api/blacklist_api.rb +5 -5
- data/lib/messente_api/api/bulk_messaging_api.rb +2 -2
- data/lib/messente_api/api/contacts_api.rb +9 -9
- data/lib/messente_api/api/delivery_report_api.rb +2 -2
- data/lib/messente_api/api/groups_api.rb +6 -6
- data/lib/messente_api/api/number_lookup_api.rb +2 -2
- data/lib/messente_api/api/number_verification_api.rb +217 -0
- data/lib/messente_api/api/omnimessage_api.rb +3 -3
- data/lib/messente_api/api/pricing_api.rb +170 -0
- data/lib/messente_api/api/statistics_api.rb +2 -2
- data/lib/messente_api/api/whats_app_templates_api.rb +399 -0
- data/lib/messente_api/api_client.rb +1 -1
- data/lib/messente_api/api_error.rb +1 -1
- data/lib/messente_api/configuration.rb +61 -1
- data/lib/messente_api/models/bulk_omni_message_create_success_response.rb +1 -1
- data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +1 -1
- data/lib/messente_api/models/bulk_omnimessage.rb +1 -1
- data/lib/messente_api/models/channel.rb +1 -1
- data/lib/messente_api/models/contact_envelope.rb +1 -1
- data/lib/messente_api/models/contact_fields.rb +1 -1
- data/lib/messente_api/models/contact_list_envelope.rb +1 -1
- data/lib/messente_api/models/contact_response_fields.rb +1 -1
- data/lib/messente_api/models/contact_update_fields.rb +1 -1
- data/lib/messente_api/models/delivery_report_response.rb +1 -1
- data/lib/messente_api/models/delivery_result.rb +1 -1
- data/lib/messente_api/models/error_code_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_code_omnichannel_machine.rb +1 -1
- data/lib/messente_api/models/error_code_phonebook.rb +1 -1
- data/lib/messente_api/models/error_code_statistics.rb +1 -1
- data/lib/messente_api/models/error_item_number_lookup.rb +1 -1
- data/lib/messente_api/models/error_item_number_lookup_error.rb +1 -1
- data/lib/messente_api/models/error_item_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_item_phonebook.rb +1 -1
- data/lib/messente_api/models/error_item_statistics.rb +1 -1
- data/lib/messente_api/models/error_number_lookup.rb +1 -1
- data/lib/messente_api/models/error_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_phonebook.rb +1 -1
- data/lib/messente_api/models/error_statistics.rb +1 -1
- data/lib/messente_api/models/error_title_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_title_phonebook.rb +1 -1
- data/lib/messente_api/models/fetch_blacklist_success.rb +1 -1
- data/lib/messente_api/models/group_envelope.rb +1 -1
- data/lib/messente_api/models/group_list_envelope.rb +1 -1
- data/lib/messente_api/models/group_name.rb +1 -1
- data/lib/messente_api/models/group_response_fields.rb +1 -1
- data/lib/messente_api/models/message_result.rb +1 -1
- data/lib/messente_api/models/mobile_network.rb +1 -1
- data/lib/messente_api/models/number_to_blacklist.rb +1 -1
- data/lib/messente_api/models/numbers_to_investigate.rb +1 -1
- data/lib/messente_api/models/omni_message_create_success_response.rb +1 -1
- data/lib/messente_api/models/omnimessage.rb +1 -1
- data/lib/messente_api/models/omnimessage_messages_inner.rb +1 -1
- data/lib/messente_api/models/price.rb +276 -0
- data/lib/messente_api/models/price_info.rb +1 -1
- data/lib/messente_api/models/price_networks_inner.rb +257 -0
- data/lib/messente_api/models/priority.rb +1 -1
- data/lib/messente_api/models/sms.rb +1 -1
- data/lib/messente_api/models/statistics_report.rb +1 -1
- data/lib/messente_api/models/statistics_report_settings.rb +1 -1
- data/lib/messente_api/models/statistics_report_success.rb +1 -1
- data/lib/messente_api/models/status.rb +1 -1
- data/lib/messente_api/models/sync_number_lookup_result.rb +1 -1
- data/lib/messente_api/models/sync_number_lookup_success.rb +1 -1
- data/lib/messente_api/models/telegram.rb +1 -1
- data/lib/messente_api/models/text_store.rb +1 -1
- data/lib/messente_api/models/viber.rb +1 -1
- data/lib/messente_api/models/viber_video.rb +1 -1
- data/lib/messente_api/models/whats_app.rb +59 -5
- data/lib/messente_api/models/whats_app_audio.rb +239 -0
- data/lib/messente_api/models/whats_app_component.rb +2 -1
- data/lib/messente_api/models/whats_app_currency.rb +1 -1
- data/lib/messente_api/models/whats_app_datetime.rb +1 -1
- data/lib/messente_api/models/whats_app_document.rb +261 -0
- data/lib/messente_api/models/whats_app_image.rb +250 -0
- data/lib/messente_api/models/whats_app_language.rb +1 -1
- data/lib/messente_api/models/whats_app_media.rb +1 -1
- data/lib/messente_api/models/whats_app_parameter.rb +25 -5
- data/lib/messente_api/models/whats_app_sticker.rb +250 -0
- data/lib/messente_api/models/whats_app_template.rb +8 -1
- data/lib/messente_api/models/whats_app_text.rb +235 -0
- data/lib/messente_api/models/whats_app_video.rb +250 -0
- data/lib/messente_api/models/whatsapp_button_type.rb +45 -0
- data/lib/messente_api/models/whatsapp_component_type.rb +42 -0
- data/lib/messente_api/models/whatsapp_create_template_request.rb +297 -0
- data/lib/messente_api/models/whatsapp_create_template_response.rb +277 -0
- data/lib/messente_api/models/whatsapp_header_format.rb +39 -0
- data/lib/messente_api/models/whatsapp_list_templates_response.rb +241 -0
- data/lib/messente_api/models/whatsapp_otp_button_type.rb +41 -0
- data/lib/messente_api/models/whatsapp_pagination.rb +242 -0
- data/lib/messente_api/models/whatsapp_paging_cursors.rb +226 -0
- data/lib/messente_api/models/whatsapp_supported_app.rb +240 -0
- data/lib/messente_api/models/whatsapp_template_button.rb +355 -0
- data/lib/messente_api/models/whatsapp_template_category.rb +41 -0
- data/lib/messente_api/models/whatsapp_template_component.rb +277 -0
- data/lib/messente_api/models/whatsapp_template_example.rb +230 -0
- data/lib/messente_api/models/whatsapp_template_response.rb +330 -0
- data/lib/messente_api/models/whatsapp_template_status.rb +47 -0
- data/lib/messente_api/models/whatsapp_update_template_request.rb +227 -0
- data/lib/messente_api/version.rb +2 -2
- data/lib/messente_api.rb +30 -1
- data/messente_api.gemspec +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +60 -2
@@ -0,0 +1,26 @@
|
|
1
|
+
# MessenteApi::WhatsAppDocument
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Unique identifier for the document file. | [optional] |
|
8
|
+
| **caption** | **String** | Caption for the document. | [optional] |
|
9
|
+
| **mime_type** | **String** | MIME type of the document file. | [optional] |
|
10
|
+
| **file_name** | **String** | Name of the document file. | [optional] |
|
11
|
+
| **link** | **String** | URL link to the document file. | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'messente_api'
|
17
|
+
|
18
|
+
instance = MessenteApi::WhatsAppDocument.new(
|
19
|
+
id: 98765,
|
20
|
+
caption: Please review this document.,
|
21
|
+
mime_type: application/pdf,
|
22
|
+
file_name: example.pdf,
|
23
|
+
link: https://example.com/document.pdf
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MessenteApi::WhatsAppImage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Unique identifier for the image file. | [optional] |
|
8
|
+
| **caption** | **String** | Caption for the image. | [optional] |
|
9
|
+
| **mime_type** | **String** | MIME type of the image file. | [optional] |
|
10
|
+
| **link** | **String** | URL link to the image file. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'messente_api'
|
16
|
+
|
17
|
+
instance = MessenteApi::WhatsAppImage.new(
|
18
|
+
id: 12345,
|
19
|
+
caption: Check out this image!,
|
20
|
+
mime_type: image/jpeg,
|
21
|
+
link: https://example.com/image.jpg
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
data/docs/WhatsAppParameter.md
CHANGED
@@ -11,6 +11,8 @@
|
|
11
11
|
| **image** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|
12
12
|
| **document** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|
13
13
|
| **video** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|
14
|
+
| **coupon_code** | **String** | A coupon code. | [optional] |
|
15
|
+
| **payload** | **String** | A payload. | [optional] |
|
14
16
|
|
15
17
|
## Example
|
16
18
|
|
@@ -24,7 +26,9 @@ instance = MessenteApi::WhatsAppParameter.new(
|
|
24
26
|
date_time: null,
|
25
27
|
image: null,
|
26
28
|
document: null,
|
27
|
-
video: null
|
29
|
+
video: null,
|
30
|
+
coupon_code: null,
|
31
|
+
payload: null
|
28
32
|
)
|
29
33
|
```
|
30
34
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MessenteApi::WhatsAppSticker
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Unique identifier for the sticker file. | [optional] |
|
8
|
+
| **mime_type** | **String** | MIME type of the sticker file. | [optional] |
|
9
|
+
| **animated** | **Boolean** | Indicates whether the sticker is animated. | [optional] |
|
10
|
+
| **link** | **String** | URL link to the sticker file. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'messente_api'
|
16
|
+
|
17
|
+
instance = MessenteApi::WhatsAppSticker.new(
|
18
|
+
id: 54321,
|
19
|
+
mime_type: image/webp,
|
20
|
+
animated: true,
|
21
|
+
link: https://example.com/sticker.webp
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
data/docs/WhatsAppTemplate.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **name** | **String** | Name of the template | |
|
8
8
|
| **language** | [**WhatsAppLanguage**](WhatsAppLanguage.md) | | |
|
9
|
-
| **components** | [**Array<WhatsAppComponent>**](WhatsAppComponent.md) | List of template components |
|
9
|
+
| **components** | [**Array<WhatsAppComponent>**](WhatsAppComponent.md) | List of template components | |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
@@ -0,0 +1,384 @@
|
|
1
|
+
# MessenteApi::WhatsAppTemplatesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.messente.com/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_whatsapp_template**](WhatsAppTemplatesApi.md#create_whatsapp_template) | **POST** /whatsapp/wabas/{wabaId}/templates | Creates a WhatsApp template |
|
8
|
+
| [**delete_whatsapp_template**](WhatsAppTemplatesApi.md#delete_whatsapp_template) | **DELETE** /whatsapp/wabas/{wabaId}/templates | Deletes a WhatsApp template |
|
9
|
+
| [**get_whatsapp_template_by_id**](WhatsAppTemplatesApi.md#get_whatsapp_template_by_id) | **GET** /whatsapp/wabas/{wabaId}/templates/{templateId} | Requests a WhatsApp template with the given ID |
|
10
|
+
| [**list_whatsapp_templates**](WhatsAppTemplatesApi.md#list_whatsapp_templates) | **GET** /whatsapp/wabas/{wabaId}/templates | Requests a list of WhatsApp templates |
|
11
|
+
| [**update_whatsapp_template**](WhatsAppTemplatesApi.md#update_whatsapp_template) | **PUT** /whatsapp/wabas/{wabaId}/templates/{templateId} | Updates a WhatsApp template |
|
12
|
+
|
13
|
+
|
14
|
+
## create_whatsapp_template
|
15
|
+
|
16
|
+
> <WhatsappCreateTemplateResponse> create_whatsapp_template(waba_id, whatsapp_create_template_request)
|
17
|
+
|
18
|
+
Creates a WhatsApp template
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'messente_api'
|
25
|
+
# setup authorization
|
26
|
+
MessenteApi.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: basicAuth
|
28
|
+
config.username = 'YOUR USERNAME'
|
29
|
+
config.password = 'YOUR PASSWORD'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = MessenteApi::WhatsAppTemplatesApi.new
|
33
|
+
waba_id = 'waba_id_example' # String | The ID of the WABA
|
34
|
+
whatsapp_create_template_request = MessenteApi::WhatsappCreateTemplateRequest.new({name: 'name_example', category: MessenteApi::WhatsappTemplateCategory::AUTHENTICATION, language: 'language_example', components: [MessenteApi::WhatsappTemplateComponent.new]}) # WhatsappCreateTemplateRequest | The WhatsApp template to create
|
35
|
+
|
36
|
+
begin
|
37
|
+
# Creates a WhatsApp template
|
38
|
+
result = api_instance.create_whatsapp_template(waba_id, whatsapp_create_template_request)
|
39
|
+
p result
|
40
|
+
rescue MessenteApi::ApiError => e
|
41
|
+
puts "Error when calling WhatsAppTemplatesApi->create_whatsapp_template: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
#### Using the create_whatsapp_template_with_http_info variant
|
46
|
+
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
48
|
+
|
49
|
+
> <Array(<WhatsappCreateTemplateResponse>, Integer, Hash)> create_whatsapp_template_with_http_info(waba_id, whatsapp_create_template_request)
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
begin
|
53
|
+
# Creates a WhatsApp template
|
54
|
+
data, status_code, headers = api_instance.create_whatsapp_template_with_http_info(waba_id, whatsapp_create_template_request)
|
55
|
+
p status_code # => 2xx
|
56
|
+
p headers # => { ... }
|
57
|
+
p data # => <WhatsappCreateTemplateResponse>
|
58
|
+
rescue MessenteApi::ApiError => e
|
59
|
+
puts "Error when calling WhatsAppTemplatesApi->create_whatsapp_template_with_http_info: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Parameters
|
64
|
+
|
65
|
+
| Name | Type | Description | Notes |
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
67
|
+
| **waba_id** | **String** | The ID of the WABA | |
|
68
|
+
| **whatsapp_create_template_request** | [**WhatsappCreateTemplateRequest**](WhatsappCreateTemplateRequest.md) | The WhatsApp template to create | |
|
69
|
+
|
70
|
+
### Return type
|
71
|
+
|
72
|
+
[**WhatsappCreateTemplateResponse**](WhatsappCreateTemplateResponse.md)
|
73
|
+
|
74
|
+
### Authorization
|
75
|
+
|
76
|
+
[basicAuth](../README.md#basicAuth)
|
77
|
+
|
78
|
+
### HTTP request headers
|
79
|
+
|
80
|
+
- **Content-Type**: application/json
|
81
|
+
- **Accept**: application/json
|
82
|
+
|
83
|
+
|
84
|
+
## delete_whatsapp_template
|
85
|
+
|
86
|
+
> Object delete_whatsapp_template(waba_id, name, opts)
|
87
|
+
|
88
|
+
Deletes a WhatsApp template
|
89
|
+
|
90
|
+
### Examples
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
require 'time'
|
94
|
+
require 'messente_api'
|
95
|
+
# setup authorization
|
96
|
+
MessenteApi.configure do |config|
|
97
|
+
# Configure HTTP basic authorization: basicAuth
|
98
|
+
config.username = 'YOUR USERNAME'
|
99
|
+
config.password = 'YOUR PASSWORD'
|
100
|
+
end
|
101
|
+
|
102
|
+
api_instance = MessenteApi::WhatsAppTemplatesApi.new
|
103
|
+
waba_id = 'waba_id_example' # String | The ID of the WABA
|
104
|
+
name = 'template_name' # String | The name of the template to delete
|
105
|
+
opts = {
|
106
|
+
hsm_id: '1' # String | The ID of the template to delete
|
107
|
+
}
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Deletes a WhatsApp template
|
111
|
+
result = api_instance.delete_whatsapp_template(waba_id, name, opts)
|
112
|
+
p result
|
113
|
+
rescue MessenteApi::ApiError => e
|
114
|
+
puts "Error when calling WhatsAppTemplatesApi->delete_whatsapp_template: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
#### Using the delete_whatsapp_template_with_http_info variant
|
119
|
+
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
121
|
+
|
122
|
+
> <Array(Object, Integer, Hash)> delete_whatsapp_template_with_http_info(waba_id, name, opts)
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
begin
|
126
|
+
# Deletes a WhatsApp template
|
127
|
+
data, status_code, headers = api_instance.delete_whatsapp_template_with_http_info(waba_id, name, opts)
|
128
|
+
p status_code # => 2xx
|
129
|
+
p headers # => { ... }
|
130
|
+
p data # => Object
|
131
|
+
rescue MessenteApi::ApiError => e
|
132
|
+
puts "Error when calling WhatsAppTemplatesApi->delete_whatsapp_template_with_http_info: #{e}"
|
133
|
+
end
|
134
|
+
```
|
135
|
+
|
136
|
+
### Parameters
|
137
|
+
|
138
|
+
| Name | Type | Description | Notes |
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
140
|
+
| **waba_id** | **String** | The ID of the WABA | |
|
141
|
+
| **name** | **String** | The name of the template to delete | |
|
142
|
+
| **hsm_id** | **String** | The ID of the template to delete | [optional] |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
**Object**
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
[basicAuth](../README.md#basicAuth)
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: Not defined
|
155
|
+
- **Accept**: application/json
|
156
|
+
|
157
|
+
|
158
|
+
## get_whatsapp_template_by_id
|
159
|
+
|
160
|
+
> <WhatsappTemplateResponse> get_whatsapp_template_by_id(waba_id, template_id)
|
161
|
+
|
162
|
+
Requests a WhatsApp template with the given ID
|
163
|
+
|
164
|
+
### Examples
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
require 'time'
|
168
|
+
require 'messente_api'
|
169
|
+
# setup authorization
|
170
|
+
MessenteApi.configure do |config|
|
171
|
+
# Configure HTTP basic authorization: basicAuth
|
172
|
+
config.username = 'YOUR USERNAME'
|
173
|
+
config.password = 'YOUR PASSWORD'
|
174
|
+
end
|
175
|
+
|
176
|
+
api_instance = MessenteApi::WhatsAppTemplatesApi.new
|
177
|
+
waba_id = 'waba_id_example' # String | The ID of the WABA
|
178
|
+
template_id = 'template_id_example' # String | The ID of the template to retrieve
|
179
|
+
|
180
|
+
begin
|
181
|
+
# Requests a WhatsApp template with the given ID
|
182
|
+
result = api_instance.get_whatsapp_template_by_id(waba_id, template_id)
|
183
|
+
p result
|
184
|
+
rescue MessenteApi::ApiError => e
|
185
|
+
puts "Error when calling WhatsAppTemplatesApi->get_whatsapp_template_by_id: #{e}"
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
#### Using the get_whatsapp_template_by_id_with_http_info variant
|
190
|
+
|
191
|
+
This returns an Array which contains the response data, status code and headers.
|
192
|
+
|
193
|
+
> <Array(<WhatsappTemplateResponse>, Integer, Hash)> get_whatsapp_template_by_id_with_http_info(waba_id, template_id)
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
begin
|
197
|
+
# Requests a WhatsApp template with the given ID
|
198
|
+
data, status_code, headers = api_instance.get_whatsapp_template_by_id_with_http_info(waba_id, template_id)
|
199
|
+
p status_code # => 2xx
|
200
|
+
p headers # => { ... }
|
201
|
+
p data # => <WhatsappTemplateResponse>
|
202
|
+
rescue MessenteApi::ApiError => e
|
203
|
+
puts "Error when calling WhatsAppTemplatesApi->get_whatsapp_template_by_id_with_http_info: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
| Name | Type | Description | Notes |
|
210
|
+
| ---- | ---- | ----------- | ----- |
|
211
|
+
| **waba_id** | **String** | The ID of the WABA | |
|
212
|
+
| **template_id** | **String** | The ID of the template to retrieve | |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
[**WhatsappTemplateResponse**](WhatsappTemplateResponse.md)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[basicAuth](../README.md#basicAuth)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: Not defined
|
225
|
+
- **Accept**: application/json
|
226
|
+
|
227
|
+
|
228
|
+
## list_whatsapp_templates
|
229
|
+
|
230
|
+
> <WhatsappListTemplatesResponse> list_whatsapp_templates(waba_id, opts)
|
231
|
+
|
232
|
+
Requests a list of WhatsApp templates
|
233
|
+
|
234
|
+
### Examples
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
require 'time'
|
238
|
+
require 'messente_api'
|
239
|
+
# setup authorization
|
240
|
+
MessenteApi.configure do |config|
|
241
|
+
# Configure HTTP basic authorization: basicAuth
|
242
|
+
config.username = 'YOUR USERNAME'
|
243
|
+
config.password = 'YOUR PASSWORD'
|
244
|
+
end
|
245
|
+
|
246
|
+
api_instance = MessenteApi::WhatsAppTemplatesApi.new
|
247
|
+
waba_id = 'waba_id_example' # String | The ID of the WABA
|
248
|
+
opts = {
|
249
|
+
limit: 10, # Integer | The number of templates to return in the list. Although the max size is 500, for large datasets it is recommended to use a lower limit and instead use pagination to avoid potential timeouts. Defaults to 25.
|
250
|
+
before: 'MAZDZD', # String | A cursor point used for a paginated request to indicate the template to paginate backwards from.
|
251
|
+
after: 'MjQZD', # String | A cursor point used for a paginated request to indicate the template to paginate forwards from.
|
252
|
+
category: MessenteApi::WhatsappTemplateCategory::AUTHENTICATION, # WhatsappTemplateCategory | A filter for returning only templates matching a specific category.
|
253
|
+
content: 'special offer', # String | A search filter representing the content of a template. Only matching templates will be returned in the list.
|
254
|
+
language: 'en', # String | A filter for returning only templates matching a specific language code. A list of supported languages is available in the [WhatsApp documentation](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates/)
|
255
|
+
name: 'Sample Template', # String | A search filter representing the name, either full or partial, of a template. Only matching templates will be returned in the list.
|
256
|
+
status: MessenteApi::WhatsappTemplateStatus::APPROVED # WhatsappTemplateStatus | A filter for returning only templates matching a specific status.
|
257
|
+
}
|
258
|
+
|
259
|
+
begin
|
260
|
+
# Requests a list of WhatsApp templates
|
261
|
+
result = api_instance.list_whatsapp_templates(waba_id, opts)
|
262
|
+
p result
|
263
|
+
rescue MessenteApi::ApiError => e
|
264
|
+
puts "Error when calling WhatsAppTemplatesApi->list_whatsapp_templates: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
#### Using the list_whatsapp_templates_with_http_info variant
|
269
|
+
|
270
|
+
This returns an Array which contains the response data, status code and headers.
|
271
|
+
|
272
|
+
> <Array(<WhatsappListTemplatesResponse>, Integer, Hash)> list_whatsapp_templates_with_http_info(waba_id, opts)
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
begin
|
276
|
+
# Requests a list of WhatsApp templates
|
277
|
+
data, status_code, headers = api_instance.list_whatsapp_templates_with_http_info(waba_id, opts)
|
278
|
+
p status_code # => 2xx
|
279
|
+
p headers # => { ... }
|
280
|
+
p data # => <WhatsappListTemplatesResponse>
|
281
|
+
rescue MessenteApi::ApiError => e
|
282
|
+
puts "Error when calling WhatsAppTemplatesApi->list_whatsapp_templates_with_http_info: #{e}"
|
283
|
+
end
|
284
|
+
```
|
285
|
+
|
286
|
+
### Parameters
|
287
|
+
|
288
|
+
| Name | Type | Description | Notes |
|
289
|
+
| ---- | ---- | ----------- | ----- |
|
290
|
+
| **waba_id** | **String** | The ID of the WABA | |
|
291
|
+
| **limit** | **Integer** | The number of templates to return in the list. Although the max size is 500, for large datasets it is recommended to use a lower limit and instead use pagination to avoid potential timeouts. Defaults to 25. | [optional][default to 25] |
|
292
|
+
| **before** | **String** | A cursor point used for a paginated request to indicate the template to paginate backwards from. | [optional] |
|
293
|
+
| **after** | **String** | A cursor point used for a paginated request to indicate the template to paginate forwards from. | [optional] |
|
294
|
+
| **category** | [**WhatsappTemplateCategory**](.md) | A filter for returning only templates matching a specific category. | [optional] |
|
295
|
+
| **content** | **String** | A search filter representing the content of a template. Only matching templates will be returned in the list. | [optional] |
|
296
|
+
| **language** | **String** | A filter for returning only templates matching a specific language code. A list of supported languages is available in the [WhatsApp documentation](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates/) | [optional] |
|
297
|
+
| **name** | **String** | A search filter representing the name, either full or partial, of a template. Only matching templates will be returned in the list. | [optional] |
|
298
|
+
| **status** | [**WhatsappTemplateStatus**](.md) | A filter for returning only templates matching a specific status. | [optional] |
|
299
|
+
|
300
|
+
### Return type
|
301
|
+
|
302
|
+
[**WhatsappListTemplatesResponse**](WhatsappListTemplatesResponse.md)
|
303
|
+
|
304
|
+
### Authorization
|
305
|
+
|
306
|
+
[basicAuth](../README.md#basicAuth)
|
307
|
+
|
308
|
+
### HTTP request headers
|
309
|
+
|
310
|
+
- **Content-Type**: Not defined
|
311
|
+
- **Accept**: application/json
|
312
|
+
|
313
|
+
|
314
|
+
## update_whatsapp_template
|
315
|
+
|
316
|
+
> Object update_whatsapp_template(waba_id, template_id, whatsapp_update_template_request)
|
317
|
+
|
318
|
+
Updates a WhatsApp template
|
319
|
+
|
320
|
+
### Examples
|
321
|
+
|
322
|
+
```ruby
|
323
|
+
require 'time'
|
324
|
+
require 'messente_api'
|
325
|
+
# setup authorization
|
326
|
+
MessenteApi.configure do |config|
|
327
|
+
# Configure HTTP basic authorization: basicAuth
|
328
|
+
config.username = 'YOUR USERNAME'
|
329
|
+
config.password = 'YOUR PASSWORD'
|
330
|
+
end
|
331
|
+
|
332
|
+
api_instance = MessenteApi::WhatsAppTemplatesApi.new
|
333
|
+
waba_id = 'waba_id_example' # String | The ID of the WABA
|
334
|
+
template_id = 'template_id_example' # String | The ID of the template to update
|
335
|
+
whatsapp_update_template_request = MessenteApi::WhatsappUpdateTemplateRequest.new # WhatsappUpdateTemplateRequest | The template data to be updated
|
336
|
+
|
337
|
+
begin
|
338
|
+
# Updates a WhatsApp template
|
339
|
+
result = api_instance.update_whatsapp_template(waba_id, template_id, whatsapp_update_template_request)
|
340
|
+
p result
|
341
|
+
rescue MessenteApi::ApiError => e
|
342
|
+
puts "Error when calling WhatsAppTemplatesApi->update_whatsapp_template: #{e}"
|
343
|
+
end
|
344
|
+
```
|
345
|
+
|
346
|
+
#### Using the update_whatsapp_template_with_http_info variant
|
347
|
+
|
348
|
+
This returns an Array which contains the response data, status code and headers.
|
349
|
+
|
350
|
+
> <Array(Object, Integer, Hash)> update_whatsapp_template_with_http_info(waba_id, template_id, whatsapp_update_template_request)
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
begin
|
354
|
+
# Updates a WhatsApp template
|
355
|
+
data, status_code, headers = api_instance.update_whatsapp_template_with_http_info(waba_id, template_id, whatsapp_update_template_request)
|
356
|
+
p status_code # => 2xx
|
357
|
+
p headers # => { ... }
|
358
|
+
p data # => Object
|
359
|
+
rescue MessenteApi::ApiError => e
|
360
|
+
puts "Error when calling WhatsAppTemplatesApi->update_whatsapp_template_with_http_info: #{e}"
|
361
|
+
end
|
362
|
+
```
|
363
|
+
|
364
|
+
### Parameters
|
365
|
+
|
366
|
+
| Name | Type | Description | Notes |
|
367
|
+
| ---- | ---- | ----------- | ----- |
|
368
|
+
| **waba_id** | **String** | The ID of the WABA | |
|
369
|
+
| **template_id** | **String** | The ID of the template to update | |
|
370
|
+
| **whatsapp_update_template_request** | [**WhatsappUpdateTemplateRequest**](WhatsappUpdateTemplateRequest.md) | The template data to be updated | |
|
371
|
+
|
372
|
+
### Return type
|
373
|
+
|
374
|
+
**Object**
|
375
|
+
|
376
|
+
### Authorization
|
377
|
+
|
378
|
+
[basicAuth](../README.md#basicAuth)
|
379
|
+
|
380
|
+
### HTTP request headers
|
381
|
+
|
382
|
+
- **Content-Type**: application/json
|
383
|
+
- **Accept**: application/json
|
384
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# MessenteApi::WhatsAppText
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **preview_url** | **Boolean** | Whether to display link preview if the message contains a hyperlink | [optional][default to true] |
|
8
|
+
| **body** | **String** | Plaintext content for WhatsApp, can contain URLs, emojis and formatting | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'messente_api'
|
14
|
+
|
15
|
+
instance = MessenteApi::WhatsAppText.new(
|
16
|
+
preview_url: null,
|
17
|
+
body: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MessenteApi::WhatsAppVideo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Unique identifier for the video file. | [optional] |
|
8
|
+
| **caption** | **String** | Caption for the video. | [optional] |
|
9
|
+
| **mime_type** | **String** | MIME type of the video file. | [optional] |
|
10
|
+
| **link** | **String** | URL link to the video file. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'messente_api'
|
16
|
+
|
17
|
+
instance = MessenteApi::WhatsAppVideo.new(
|
18
|
+
id: 67890,
|
19
|
+
caption: Check out this video!,
|
20
|
+
mime_type: video/mp4,
|
21
|
+
link: https://example.com/video.mp4
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# MessenteApi::WhatsappButtonType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'messente_api'
|
12
|
+
|
13
|
+
instance = MessenteApi::WhatsappButtonType.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# MessenteApi::WhatsappComponentType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'messente_api'
|
12
|
+
|
13
|
+
instance = MessenteApi::WhatsappComponentType.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MessenteApi::WhatsappCreateTemplateRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the template | |
|
8
|
+
| **category** | [**WhatsappTemplateCategory**](WhatsappTemplateCategory.md) | | |
|
9
|
+
| **language** | **String** | Language of the template | |
|
10
|
+
| **components** | [**Array<WhatsappTemplateComponent>**](WhatsappTemplateComponent.md) | List of template components | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'messente_api'
|
16
|
+
|
17
|
+
instance = MessenteApi::WhatsappCreateTemplateRequest.new(
|
18
|
+
name: null,
|
19
|
+
category: null,
|
20
|
+
language: null,
|
21
|
+
components: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# MessenteApi::WhatsappCreateTemplateResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Template ID | |
|
8
|
+
| **status** | [**WhatsappTemplateStatus**](WhatsappTemplateStatus.md) | | |
|
9
|
+
| **category** | [**WhatsappTemplateCategory**](WhatsappTemplateCategory.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'messente_api'
|
15
|
+
|
16
|
+
instance = MessenteApi::WhatsappCreateTemplateResponse.new(
|
17
|
+
id: null,
|
18
|
+
status: null,
|
19
|
+
category: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# MessenteApi::WhatsappHeaderFormat
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'messente_api'
|
12
|
+
|
13
|
+
instance = MessenteApi::WhatsappHeaderFormat.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# MessenteApi::WhatsappListTemplatesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **templates** | [**Array<WhatsappTemplateResponse>**](WhatsappTemplateResponse.md) | List of templates | |
|
8
|
+
| **paging** | [**WhatsappPagination**](WhatsappPagination.md) | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'messente_api'
|
14
|
+
|
15
|
+
instance = MessenteApi::WhatsappListTemplatesResponse.new(
|
16
|
+
templates: null,
|
17
|
+
paging: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# MessenteApi::WhatsappOtpButtonType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'messente_api'
|
12
|
+
|
13
|
+
instance = MessenteApi::WhatsappOtpButtonType.new()
|
14
|
+
```
|
15
|
+
|