sentdm 0.26.0 → 0.28.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/CHANGELOG.md +40 -0
- data/README.md +1 -27
- data/lib/sentdm/client.rb +71 -8
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/models/contact_create_response.rb +249 -0
- data/lib/sentdm/models/contact_delete_params.rb +16 -2
- data/lib/sentdm/models/contact_list_response.rb +299 -16
- data/lib/sentdm/models/contact_retrieve_message_summary_response.rb +186 -0
- data/lib/sentdm/models/contact_retrieve_response.rb +249 -0
- data/lib/sentdm/models/contact_update_response.rb +249 -0
- data/lib/sentdm/models/conversation_list_messages_response.rb +436 -0
- data/lib/sentdm/models/conversation_list_response.rb +433 -0
- data/lib/sentdm/models/inbound_message_event.rb +52 -0
- data/lib/sentdm/models/inbound_message_event_payload.rb +81 -0
- data/lib/sentdm/models/me_retrieve_response.rb +242 -12
- data/lib/sentdm/models/message_event.rb +53 -0
- data/lib/sentdm/models/message_event_payload.rb +92 -0
- data/lib/sentdm/models/message_retrieve_activities_response.rb +165 -7
- data/lib/sentdm/models/message_retrieve_status_response.rb +74 -6
- data/lib/sentdm/models/message_send_response.rb +113 -28
- data/lib/sentdm/models/number_lookup_response.rb +74 -6
- data/lib/sentdm/models/profile_complete_response.rb +74 -6
- data/lib/sentdm/models/profile_create_params.rb +378 -26
- data/lib/sentdm/models/profile_create_response.rb +760 -0
- data/lib/sentdm/models/profile_delete_params.rb +16 -2
- data/lib/sentdm/models/profile_list_response.rb +825 -14
- data/lib/sentdm/models/profile_retrieve_response.rb +762 -0
- data/lib/sentdm/models/profile_update_params.rb +391 -24
- data/lib/sentdm/models/profile_update_response.rb +760 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_create_response.rb +420 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +17 -2
- data/lib/sentdm/models/profiles/campaign_list_response.rb +421 -0
- data/lib/sentdm/models/profiles/campaign_update_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_update_response.rb +420 -0
- data/lib/sentdm/models/template_create_response.rb +209 -0
- data/lib/sentdm/models/template_event.rb +52 -0
- data/lib/sentdm/models/template_event_payload.rb +88 -0
- data/lib/sentdm/models/template_list_params.rb +9 -2
- data/lib/sentdm/models/template_list_response.rb +262 -16
- data/lib/sentdm/models/template_retrieve_response.rb +209 -0
- data/lib/sentdm/models/template_update_response.rb +209 -0
- data/lib/sentdm/models/user_invite_response.rb +201 -0
- data/lib/sentdm/models/user_list_response.rb +259 -14
- data/lib/sentdm/models/user_remove_params.rb +16 -2
- data/lib/sentdm/models/user_retrieve_response.rb +201 -0
- data/lib/sentdm/models/user_update_role_response.rb +201 -0
- data/lib/sentdm/models/webhook_create_response.rb +229 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +213 -13
- data/lib/sentdm/models/webhook_list_events_response.rb +207 -16
- data/lib/sentdm/models/webhook_list_response.rb +280 -15
- data/lib/sentdm/models/webhook_retrieve_response.rb +229 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +17 -2
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +74 -6
- data/lib/sentdm/models/webhook_test_response.rb +74 -6
- data/lib/sentdm/models/webhook_toggle_status_response.rb +229 -0
- data/lib/sentdm/models/webhook_update_response.rb +229 -0
- data/lib/sentdm/models.rb +11 -51
- data/lib/sentdm/resources/contacts.rb +30 -13
- data/lib/sentdm/resources/conversations.rb +12 -4
- data/lib/sentdm/resources/me.rb +6 -1
- data/lib/sentdm/resources/messages.rb +17 -5
- data/lib/sentdm/resources/numbers.rb +6 -1
- data/lib/sentdm/resources/profiles/campaigns.rb +47 -9
- data/lib/sentdm/resources/profiles.rb +137 -61
- data/lib/sentdm/resources/templates.rb +14 -8
- data/lib/sentdm/resources/users.rb +15 -10
- data/lib/sentdm/resources/webhooks.rb +19 -9
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +28 -32
- data/rbi/sentdm/client.rbi +71 -8
- data/rbi/sentdm/models/contact_create_response.rbi +407 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +19 -2
- data/rbi/sentdm/models/contact_list_response.rbi +527 -21
- data/rbi/sentdm/models/contact_retrieve_message_summary_response.rbi +397 -0
- data/rbi/sentdm/models/contact_retrieve_response.rbi +409 -0
- data/rbi/sentdm/models/contact_update_response.rbi +407 -0
- data/rbi/sentdm/models/conversation_list_messages_response.rbi +843 -0
- data/rbi/sentdm/models/conversation_list_response.rbi +819 -0
- data/rbi/sentdm/models/inbound_message_event.rbi +88 -0
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +122 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +367 -16
- data/rbi/sentdm/models/message_event.rbi +86 -0
- data/rbi/sentdm/models/message_event_payload.rbi +132 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +335 -11
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +148 -8
- data/rbi/sentdm/models/message_send_response.rbi +178 -32
- data/rbi/sentdm/models/number_lookup_response.rbi +135 -8
- data/rbi/sentdm/models/profile_complete_response.rbi +137 -8
- data/rbi/sentdm/models/profile_create_params.rbi +592 -42
- data/rbi/sentdm/models/profile_create_response.rbi +1226 -0
- data/rbi/sentdm/models/profile_delete_params.rbi +19 -2
- data/rbi/sentdm/models/profile_list_response.rbi +1366 -18
- data/rbi/sentdm/models/profile_retrieve_response.rbi +1230 -0
- data/rbi/sentdm/models/profile_update_params.rbi +610 -30
- data/rbi/sentdm/models/profile_update_response.rbi +1226 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +674 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +14 -1
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +667 -0
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +674 -0
- data/rbi/sentdm/models/template_create_response.rbi +349 -0
- data/rbi/sentdm/models/template_event.rbi +84 -0
- data/rbi/sentdm/models/template_event_payload.rbi +131 -0
- data/rbi/sentdm/models/template_list_params.rbi +10 -2
- data/rbi/sentdm/models/template_list_response.rbi +469 -21
- data/rbi/sentdm/models/template_retrieve_response.rbi +355 -0
- data/rbi/sentdm/models/template_update_response.rbi +349 -0
- data/rbi/sentdm/models/user_invite_response.rbi +336 -0
- data/rbi/sentdm/models/user_list_response.rbi +463 -18
- data/rbi/sentdm/models/user_remove_params.rbi +19 -2
- data/rbi/sentdm/models/user_retrieve_response.rbi +336 -0
- data/rbi/sentdm/models/user_update_role_response.rbi +341 -0
- data/rbi/sentdm/models/webhook_create_response.rbi +361 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +433 -16
- data/rbi/sentdm/models/webhook_list_events_response.rbi +379 -19
- data/rbi/sentdm/models/webhook_list_response.rbi +480 -19
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +363 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +14 -1
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +148 -8
- data/rbi/sentdm/models/webhook_test_response.rbi +135 -8
- data/rbi/sentdm/models/webhook_toggle_status_response.rbi +379 -0
- data/rbi/sentdm/models/webhook_update_response.rbi +361 -0
- data/rbi/sentdm/models.rbi +11 -53
- data/rbi/sentdm/resources/contacts.rbi +24 -9
- data/rbi/sentdm/resources/conversations.rbi +10 -2
- data/rbi/sentdm/resources/me.rbi +6 -1
- data/rbi/sentdm/resources/messages.rbi +17 -5
- data/rbi/sentdm/resources/numbers.rbi +6 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +36 -6
- data/rbi/sentdm/resources/profiles.rbi +177 -68
- data/rbi/sentdm/resources/templates.rbi +15 -5
- data/rbi/sentdm/resources/users.rbi +12 -6
- data/rbi/sentdm/resources/webhooks.rbi +15 -5
- data/sig/sentdm/models/contact_create_response.rbs +216 -0
- data/sig/sentdm/models/contact_delete_params.rbs +10 -6
- data/sig/sentdm/models/contact_list_response.rbs +263 -20
- data/sig/sentdm/models/contact_retrieve_message_summary_response.rbs +182 -0
- data/sig/sentdm/models/contact_retrieve_response.rbs +216 -0
- data/sig/sentdm/models/contact_update_response.rbs +216 -0
- data/sig/sentdm/models/conversation_list_messages_response.rbs +404 -0
- data/sig/sentdm/models/conversation_list_response.rbs +404 -0
- data/sig/sentdm/models/inbound_message_event.rbs +39 -0
- data/sig/sentdm/models/inbound_message_event_payload.rbs +69 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +176 -18
- data/sig/sentdm/models/message_event.rbs +39 -0
- data/sig/sentdm/models/message_event_payload.rbs +72 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +147 -12
- data/sig/sentdm/models/message_retrieve_status_response.rbs +71 -9
- data/sig/sentdm/models/message_send_response.rbs +71 -9
- data/sig/sentdm/models/number_lookup_response.rbs +71 -9
- data/sig/sentdm/models/profile_complete_response.rbs +71 -9
- data/sig/sentdm/models/profile_create_params.rbs +271 -24
- data/sig/sentdm/models/profile_create_response.rbs +559 -0
- data/sig/sentdm/models/profile_delete_params.rbs +10 -6
- data/sig/sentdm/models/profile_list_response.rbs +615 -15
- data/sig/sentdm/models/profile_retrieve_response.rbs +559 -0
- data/sig/sentdm/models/profile_update_params.rbs +263 -12
- data/sig/sentdm/models/profile_update_response.rbs +559 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +15 -8
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +357 -0
- data/sig/sentdm/models/template_create_response.rbs +182 -0
- data/sig/sentdm/models/template_event.rbs +39 -0
- data/sig/sentdm/models/template_event_payload.rbs +76 -0
- data/sig/sentdm/models/template_list_response.rbs +230 -19
- data/sig/sentdm/models/template_retrieve_response.rbs +182 -0
- data/sig/sentdm/models/template_update_response.rbs +182 -0
- data/sig/sentdm/models/user_invite_response.rbs +177 -0
- data/sig/sentdm/models/user_list_response.rbs +233 -15
- data/sig/sentdm/models/user_remove_params.rbs +10 -6
- data/sig/sentdm/models/user_retrieve_response.rbs +177 -0
- data/sig/sentdm/models/user_update_role_response.rbs +177 -0
- data/sig/sentdm/models/webhook_create_response.rbs +208 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +203 -15
- data/sig/sentdm/models/webhook_list_events_response.rbs +160 -19
- data/sig/sentdm/models/webhook_list_response.rbs +255 -20
- data/sig/sentdm/models/webhook_retrieve_response.rbs +208 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +17 -8
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +71 -9
- data/sig/sentdm/models/webhook_test_response.rbs +71 -9
- data/sig/sentdm/models/webhook_toggle_status_response.rbs +208 -0
- data/sig/sentdm/models/webhook_update_response.rbs +208 -0
- data/sig/sentdm/models.rbs +11 -51
- data/sig/sentdm/resources/contacts.rbs +4 -4
- data/sig/sentdm/resources/conversations.rbs +2 -2
- data/sig/sentdm/resources/profiles/campaigns.rbs +5 -5
- data/sig/sentdm/resources/profiles.rbs +11 -11
- data/sig/sentdm/resources/templates.rbs +3 -3
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +4 -4
- metadata +86 -98
- data/lib/sentdm/models/api_meta.rb +0 -34
- data/lib/sentdm/models/api_response_of_contact.rb +0 -46
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +0 -43
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +0 -43
- data/lib/sentdm/models/api_response_of_profile_detail.rb +0 -43
- data/lib/sentdm/models/api_response_of_user.rb +0 -43
- data/lib/sentdm/models/api_response_template.rb +0 -43
- data/lib/sentdm/models/api_response_webhook.rb +0 -43
- data/lib/sentdm/models/billing_contact_info.rb +0 -47
- data/lib/sentdm/models/brand_business_info.rb +0 -114
- data/lib/sentdm/models/brand_compliance_info.rb +0 -67
- data/lib/sentdm/models/brand_contact_info.rb +0 -58
- data/lib/sentdm/models/brands_brand_data.rb +0 -34
- data/lib/sentdm/models/contact_message_summary.rb +0 -76
- data/lib/sentdm/models/contact_response.rb +0 -126
- data/lib/sentdm/models/conversation_messages_list.rb +0 -245
- data/lib/sentdm/models/error_detail.rb +0 -42
- data/lib/sentdm/models/mutation_request.rb +0 -20
- data/lib/sentdm/models/pagination_meta.rb +0 -80
- data/lib/sentdm/models/payment_details.rb +0 -44
- data/lib/sentdm/models/profile_detail.rb +0 -597
- data/lib/sentdm/models/profile_settings.rb +0 -66
- data/lib/sentdm/models/profiles/api_response_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/brand_campaign.rb +0 -247
- data/lib/sentdm/models/profiles/campaign_data.rb +0 -130
- data/lib/sentdm/models/profiles/campaign_use_case.rb +0 -71
- data/lib/sentdm/models/profiles/campaign_use_case_data.rb +0 -29
- data/lib/sentdm/models/template.rb +0 -90
- data/lib/sentdm/models/user_response.rb +0 -82
- data/lib/sentdm/models/webhook_event_type.rb +0 -45
- data/lib/sentdm/models/webhook_response.rb +0 -95
- data/rbi/sentdm/models/api_meta.rbi +0 -55
- data/rbi/sentdm/models/api_response_of_contact.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_user.rbi +0 -74
- data/rbi/sentdm/models/api_response_template.rbi +0 -74
- data/rbi/sentdm/models/api_response_webhook.rbi +0 -74
- data/rbi/sentdm/models/billing_contact_info.rbi +0 -65
- data/rbi/sentdm/models/brand_business_info.rbi +0 -162
- data/rbi/sentdm/models/brand_compliance_info.rbi +0 -84
- data/rbi/sentdm/models/brand_contact_info.rbi +0 -78
- data/rbi/sentdm/models/brands_brand_data.rbi +0 -65
- data/rbi/sentdm/models/contact_message_summary.rbi +0 -144
- data/rbi/sentdm/models/contact_response.rbi +0 -183
- data/rbi/sentdm/models/conversation_messages_list.rbi +0 -419
- data/rbi/sentdm/models/error_detail.rbi +0 -66
- data/rbi/sentdm/models/mutation_request.rbi +0 -32
- data/rbi/sentdm/models/pagination_meta.rbi +0 -135
- data/rbi/sentdm/models/payment_details.rbi +0 -59
- data/rbi/sentdm/models/profile_detail.rbi +0 -866
- data/rbi/sentdm/models/profile_settings.rbi +0 -86
- data/rbi/sentdm/models/profiles/api_response_of_brand_campaign.rbi +0 -81
- data/rbi/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbi +0 -76
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +0 -299
- data/rbi/sentdm/models/profiles/campaign_data.rbi +0 -146
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +0 -110
- data/rbi/sentdm/models/profiles/campaign_use_case_data.rbi +0 -51
- data/rbi/sentdm/models/template.rbi +0 -129
- data/rbi/sentdm/models/user_response.rbi +0 -118
- data/rbi/sentdm/models/webhook_event_type.rbi +0 -74
- data/rbi/sentdm/models/webhook_response.rbi +0 -140
- data/sig/sentdm/models/api_meta.rbs +0 -27
- data/sig/sentdm/models/api_response_of_contact.rbs +0 -39
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +0 -39
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +0 -39
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +0 -39
- data/sig/sentdm/models/api_response_of_user.rbs +0 -39
- data/sig/sentdm/models/api_response_template.rbs +0 -39
- data/sig/sentdm/models/api_response_webhook.rbs +0 -39
- data/sig/sentdm/models/billing_contact_info.rbs +0 -30
- data/sig/sentdm/models/brand_business_info.rbs +0 -89
- data/sig/sentdm/models/brand_compliance_info.rbs +0 -50
- data/sig/sentdm/models/brand_contact_info.rbs +0 -45
- data/sig/sentdm/models/brands_brand_data.rbs +0 -30
- data/sig/sentdm/models/contact_message_summary.rbs +0 -84
- data/sig/sentdm/models/contact_response.rbs +0 -111
- data/sig/sentdm/models/conversation_messages_list.rbs +0 -240
- data/sig/sentdm/models/error_detail.rbs +0 -39
- data/sig/sentdm/models/mutation_request.rbs +0 -15
- data/sig/sentdm/models/pagination_meta.rbs +0 -67
- data/sig/sentdm/models/payment_details.rbs +0 -30
- data/sig/sentdm/models/profile_detail.rbs +0 -469
- data/sig/sentdm/models/profile_settings.rbs +0 -50
- data/sig/sentdm/models/profiles/api_response_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/brand_campaign.rbs +0 -194
- data/sig/sentdm/models/profiles/campaign_data.rbs +0 -87
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +0 -66
- data/sig/sentdm/models/profiles/campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/template.rbs +0 -79
- data/sig/sentdm/models/user_response.rbs +0 -72
- data/sig/sentdm/models/webhook_event_type.rbs +0 -51
- data/sig/sentdm/models/webhook_response.rbs +0 -103
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class TemplateEventPayload < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute account_id
|
|
7
|
+
# The account the template belongs to.
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :account_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute category
|
|
13
|
+
# The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :category, String
|
|
17
|
+
|
|
18
|
+
# @!attribute channel
|
|
19
|
+
# The channel the template applies to.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :channel, String
|
|
23
|
+
|
|
24
|
+
# @!attribute language
|
|
25
|
+
# The template's language code, for example en_US.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :language, String
|
|
29
|
+
|
|
30
|
+
# @!attribute reason
|
|
31
|
+
# Why the template reached Status, when a reason was given. Populated on a
|
|
32
|
+
# rejection.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :reason, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute status
|
|
38
|
+
# The review status the template just reached, for example APPROVED or REJECTED.
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :status, String
|
|
42
|
+
|
|
43
|
+
# @!attribute template_id
|
|
44
|
+
# The template in Sent.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :template_id, String
|
|
48
|
+
|
|
49
|
+
# @!attribute template_name
|
|
50
|
+
# The template's display name.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, nil]
|
|
53
|
+
optional :template_name, String
|
|
54
|
+
|
|
55
|
+
# @!attribute whatsapp_template_id
|
|
56
|
+
# The template's identifier with Meta, assigned when the template is submitted for
|
|
57
|
+
# review.
|
|
58
|
+
#
|
|
59
|
+
# @return [String, nil]
|
|
60
|
+
optional :whatsapp_template_id, String
|
|
61
|
+
|
|
62
|
+
# @!method initialize(account_id: nil, category: nil, channel: nil, language: nil, reason: nil, status: nil, template_id: nil, template_name: nil, whatsapp_template_id: nil)
|
|
63
|
+
# Some parameter documentations has been truncated, see
|
|
64
|
+
# {Sentdm::Models::TemplateEventPayload} for more details.
|
|
65
|
+
#
|
|
66
|
+
# Body of a template status event. Delivered when a template's review outcome
|
|
67
|
+
# changes, so you can react without polling.
|
|
68
|
+
#
|
|
69
|
+
# @param account_id [String] The account the template belongs to.
|
|
70
|
+
#
|
|
71
|
+
# @param category [String] The template's category, for example UTILITY, MARKETING, or
|
|
72
|
+
#
|
|
73
|
+
# @param channel [String] The channel the template applies to.
|
|
74
|
+
#
|
|
75
|
+
# @param language [String] The template's language code, for example en_US.
|
|
76
|
+
#
|
|
77
|
+
# @param reason [String, nil] Why the template reached Status, when a reason was given. Populated on a
|
|
78
|
+
#
|
|
79
|
+
# @param status [String] The review status the template just reached, for example APPROVED or
|
|
80
|
+
#
|
|
81
|
+
# @param template_id [String] The template in Sent.
|
|
82
|
+
#
|
|
83
|
+
# @param template_name [String] The template's display name.
|
|
84
|
+
#
|
|
85
|
+
# @param whatsapp_template_id [String] The template's identifier with Meta, assigned when the template is submitted for
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -26,7 +26,11 @@ module Sentdm
|
|
|
26
26
|
optional :category, String, nil?: true
|
|
27
27
|
|
|
28
28
|
# @!attribute is_welcome_playground
|
|
29
|
-
#
|
|
29
|
+
# Accepted and ignored. It used to filter on the welcome-playground marker inside
|
|
30
|
+
# a template's LOB details; that filter is gone and nothing reads this value, so
|
|
31
|
+
# sending it neither narrows nor widens the result. Retained only so a client
|
|
32
|
+
# still passing is_welcome_playground keeps binding instead of the request shape
|
|
33
|
+
# changing under it.
|
|
30
34
|
#
|
|
31
35
|
# @return [Boolean, nil]
|
|
32
36
|
optional :is_welcome_playground, Sentdm::Internal::Type::Boolean, nil?: true
|
|
@@ -49,13 +53,16 @@ module Sentdm
|
|
|
49
53
|
optional :x_profile_id, String
|
|
50
54
|
|
|
51
55
|
# @!method initialize(page:, page_size:, category: nil, is_welcome_playground: nil, search: nil, status: nil, x_profile_id: nil, request_options: {})
|
|
56
|
+
# Some parameter documentations has been truncated, see
|
|
57
|
+
# {Sentdm::Models::TemplateListParams} for more details.
|
|
58
|
+
#
|
|
52
59
|
# @param page [Integer] Page number (1-indexed)
|
|
53
60
|
#
|
|
54
61
|
# @param page_size [Integer] Number of items per page
|
|
55
62
|
#
|
|
56
63
|
# @param category [String, nil] Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
57
64
|
#
|
|
58
|
-
# @param is_welcome_playground [Boolean, nil]
|
|
65
|
+
# @param is_welcome_playground [Boolean, nil] Accepted and ignored. It used to filter on the welcome-playground marker inside
|
|
59
66
|
#
|
|
60
67
|
# @param search [String, nil] Optional search term for filtering templates
|
|
61
68
|
#
|
|
@@ -5,7 +5,7 @@ module Sentdm
|
|
|
5
5
|
# @see Sentdm::Resources::Templates#list
|
|
6
6
|
class TemplateListResponse < Sentdm::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute data
|
|
8
|
-
#
|
|
8
|
+
# A paginated list of templates.
|
|
9
9
|
#
|
|
10
10
|
# @return [Sentdm::Models::TemplateListResponse::Data, nil]
|
|
11
11
|
optional :data, -> { Sentdm::Models::TemplateListResponse::Data }, nil?: true
|
|
@@ -13,14 +13,14 @@ module Sentdm
|
|
|
13
13
|
# @!attribute error
|
|
14
14
|
# Error information
|
|
15
15
|
#
|
|
16
|
-
# @return [Sentdm::Models::
|
|
17
|
-
optional :error, -> { Sentdm::
|
|
16
|
+
# @return [Sentdm::Models::TemplateListResponse::Error, nil]
|
|
17
|
+
optional :error, -> { Sentdm::Models::TemplateListResponse::Error }, nil?: true
|
|
18
18
|
|
|
19
19
|
# @!attribute meta
|
|
20
20
|
# Request and response metadata
|
|
21
21
|
#
|
|
22
|
-
# @return [Sentdm::Models::
|
|
23
|
-
optional :meta, -> { Sentdm::
|
|
22
|
+
# @return [Sentdm::Models::TemplateListResponse::Meta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::Models::TemplateListResponse::Meta }
|
|
24
24
|
|
|
25
25
|
# @!attribute success
|
|
26
26
|
# Indicates whether the request was successful
|
|
@@ -31,11 +31,11 @@ module Sentdm
|
|
|
31
31
|
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
32
32
|
# Standard API response envelope for all v3 endpoints
|
|
33
33
|
#
|
|
34
|
-
# @param data [Sentdm::Models::TemplateListResponse::Data, nil]
|
|
34
|
+
# @param data [Sentdm::Models::TemplateListResponse::Data, nil] A paginated list of templates.
|
|
35
35
|
#
|
|
36
|
-
# @param error [Sentdm::Models::
|
|
36
|
+
# @param error [Sentdm::Models::TemplateListResponse::Error, nil] Error information
|
|
37
37
|
#
|
|
38
|
-
# @param meta [Sentdm::Models::
|
|
38
|
+
# @param meta [Sentdm::Models::TemplateListResponse::Meta] Request and response metadata
|
|
39
39
|
#
|
|
40
40
|
# @param success [Boolean] Indicates whether the request was successful
|
|
41
41
|
|
|
@@ -44,21 +44,267 @@ module Sentdm
|
|
|
44
44
|
# @!attribute pagination
|
|
45
45
|
# Pagination metadata for list responses
|
|
46
46
|
#
|
|
47
|
-
# @return [Sentdm::Models::
|
|
48
|
-
optional :pagination, -> { Sentdm::
|
|
47
|
+
# @return [Sentdm::Models::TemplateListResponse::Data::Pagination, nil]
|
|
48
|
+
optional :pagination, -> { Sentdm::Models::TemplateListResponse::Data::Pagination }
|
|
49
49
|
|
|
50
50
|
# @!attribute templates
|
|
51
|
-
#
|
|
51
|
+
# The templates on this page.
|
|
52
52
|
#
|
|
53
|
-
# @return [Array<Sentdm::Models::Template>, nil]
|
|
54
|
-
optional :templates,
|
|
53
|
+
# @return [Array<Sentdm::Models::TemplateListResponse::Data::Template>, nil]
|
|
54
|
+
optional :templates,
|
|
55
|
+
-> { Sentdm::Internal::Type::ArrayOf[Sentdm::Models::TemplateListResponse::Data::Template] }
|
|
55
56
|
|
|
56
57
|
# @!method initialize(pagination: nil, templates: nil)
|
|
57
|
-
#
|
|
58
|
+
# A paginated list of templates.
|
|
58
59
|
#
|
|
59
|
-
# @param pagination [Sentdm::Models::
|
|
60
|
+
# @param pagination [Sentdm::Models::TemplateListResponse::Data::Pagination] Pagination metadata for list responses
|
|
60
61
|
#
|
|
61
|
-
# @param templates [Array<Sentdm::Models::Template>]
|
|
62
|
+
# @param templates [Array<Sentdm::Models::TemplateListResponse::Data::Template>] The templates on this page.
|
|
63
|
+
|
|
64
|
+
# @see Sentdm::Models::TemplateListResponse::Data#pagination
|
|
65
|
+
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
66
|
+
# @!attribute cursors
|
|
67
|
+
# @deprecated
|
|
68
|
+
#
|
|
69
|
+
# Cursor-based pagination. Never populated — see Cursors.
|
|
70
|
+
#
|
|
71
|
+
# @return [Sentdm::Models::TemplateListResponse::Data::Pagination::Cursors, nil]
|
|
72
|
+
optional :cursors, -> { Sentdm::Models::TemplateListResponse::Data::Pagination::Cursors }, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!attribute has_more
|
|
75
|
+
# Whether there are more pages after this one
|
|
76
|
+
#
|
|
77
|
+
# @return [Boolean, nil]
|
|
78
|
+
optional :has_more, Sentdm::Internal::Type::Boolean
|
|
79
|
+
|
|
80
|
+
# @!attribute page
|
|
81
|
+
# Current page number (1-indexed)
|
|
82
|
+
#
|
|
83
|
+
# @return [Integer, nil]
|
|
84
|
+
optional :page, Integer
|
|
85
|
+
|
|
86
|
+
# @!attribute page_size
|
|
87
|
+
# Number of items per page
|
|
88
|
+
#
|
|
89
|
+
# @return [Integer, nil]
|
|
90
|
+
optional :page_size, Integer
|
|
91
|
+
|
|
92
|
+
# @!attribute total_count
|
|
93
|
+
# Total number of items across all pages
|
|
94
|
+
#
|
|
95
|
+
# @return [Integer, nil]
|
|
96
|
+
optional :total_count, Integer
|
|
97
|
+
|
|
98
|
+
# @!attribute total_pages
|
|
99
|
+
# Total number of pages
|
|
100
|
+
#
|
|
101
|
+
# @return [Integer, nil]
|
|
102
|
+
optional :total_pages, Integer
|
|
103
|
+
|
|
104
|
+
# @!method initialize(cursors: nil, has_more: nil, page: nil, page_size: nil, total_count: nil, total_pages: nil)
|
|
105
|
+
# Pagination metadata for list responses
|
|
106
|
+
#
|
|
107
|
+
# @param cursors [Sentdm::Models::TemplateListResponse::Data::Pagination::Cursors, nil] Cursor-based pagination. Never populated — see Cursors.
|
|
108
|
+
#
|
|
109
|
+
# @param has_more [Boolean] Whether there are more pages after this one
|
|
110
|
+
#
|
|
111
|
+
# @param page [Integer] Current page number (1-indexed)
|
|
112
|
+
#
|
|
113
|
+
# @param page_size [Integer] Number of items per page
|
|
114
|
+
#
|
|
115
|
+
# @param total_count [Integer] Total number of items across all pages
|
|
116
|
+
#
|
|
117
|
+
# @param total_pages [Integer] Total number of pages
|
|
118
|
+
|
|
119
|
+
# @deprecated
|
|
120
|
+
#
|
|
121
|
+
# @see Sentdm::Models::TemplateListResponse::Data::Pagination#cursors
|
|
122
|
+
class Cursors < Sentdm::Internal::Type::BaseModel
|
|
123
|
+
# @!attribute after
|
|
124
|
+
# Cursor to fetch the next page.
|
|
125
|
+
#
|
|
126
|
+
# @return [String, nil]
|
|
127
|
+
optional :after, String, nil?: true
|
|
128
|
+
|
|
129
|
+
# @!attribute before
|
|
130
|
+
# Cursor to fetch the previous page.
|
|
131
|
+
#
|
|
132
|
+
# @return [String, nil]
|
|
133
|
+
optional :before, String, nil?: true
|
|
134
|
+
|
|
135
|
+
# @!method initialize(after: nil, before: nil)
|
|
136
|
+
# Cursor-based pagination. Never populated — see Cursors.
|
|
137
|
+
#
|
|
138
|
+
# @param after [String, nil] Cursor to fetch the next page.
|
|
139
|
+
#
|
|
140
|
+
# @param before [String, nil] Cursor to fetch the previous page.
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
class Template < Sentdm::Internal::Type::BaseModel
|
|
145
|
+
# @!attribute customer_id
|
|
146
|
+
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
147
|
+
# Says whose resource this is, which the resource's own id does not.
|
|
148
|
+
#
|
|
149
|
+
# @return [String]
|
|
150
|
+
required :customer_id, String
|
|
151
|
+
|
|
152
|
+
# @!attribute id
|
|
153
|
+
# Unique template identifier
|
|
154
|
+
#
|
|
155
|
+
# @return [String, nil]
|
|
156
|
+
optional :id, String
|
|
157
|
+
|
|
158
|
+
# @!attribute category
|
|
159
|
+
# Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
160
|
+
#
|
|
161
|
+
# @return [String, nil]
|
|
162
|
+
optional :category, String
|
|
163
|
+
|
|
164
|
+
# @!attribute channels
|
|
165
|
+
# Supported channels: sms, whatsapp
|
|
166
|
+
#
|
|
167
|
+
# @return [Array<String>, nil]
|
|
168
|
+
optional :channels, Sentdm::Internal::Type::ArrayOf[String], nil?: true
|
|
169
|
+
|
|
170
|
+
# @!attribute created_at
|
|
171
|
+
# When the template was created
|
|
172
|
+
#
|
|
173
|
+
# @return [Time, nil]
|
|
174
|
+
optional :created_at, Time
|
|
175
|
+
|
|
176
|
+
# @!attribute is_published
|
|
177
|
+
# Whether the template is published and active
|
|
178
|
+
#
|
|
179
|
+
# @return [Boolean, nil]
|
|
180
|
+
optional :is_published, Sentdm::Internal::Type::Boolean
|
|
181
|
+
|
|
182
|
+
# @!attribute language
|
|
183
|
+
# Template language code (e.g., en_US)
|
|
184
|
+
#
|
|
185
|
+
# @return [String, nil]
|
|
186
|
+
optional :language, String
|
|
187
|
+
|
|
188
|
+
# @!attribute name
|
|
189
|
+
# Template display name
|
|
190
|
+
#
|
|
191
|
+
# @return [String, nil]
|
|
192
|
+
optional :name, String
|
|
193
|
+
|
|
194
|
+
# @!attribute status
|
|
195
|
+
# Template status: APPROVED, PENDING, REJECTED
|
|
196
|
+
#
|
|
197
|
+
# @return [String, nil]
|
|
198
|
+
optional :status, String
|
|
199
|
+
|
|
200
|
+
# @!attribute updated_at
|
|
201
|
+
# When the template was last updated
|
|
202
|
+
#
|
|
203
|
+
# @return [Time, nil]
|
|
204
|
+
optional :updated_at, Time, nil?: true
|
|
205
|
+
|
|
206
|
+
# @!attribute variables
|
|
207
|
+
# Template variables for personalization
|
|
208
|
+
#
|
|
209
|
+
# @return [Array<String>, nil]
|
|
210
|
+
optional :variables, Sentdm::Internal::Type::ArrayOf[String], nil?: true
|
|
211
|
+
|
|
212
|
+
# @!method initialize(customer_id:, id: nil, category: nil, channels: nil, created_at: nil, is_published: nil, language: nil, name: nil, status: nil, updated_at: nil, variables: nil)
|
|
213
|
+
# Some parameter documentations has been truncated, see
|
|
214
|
+
# {Sentdm::Models::TemplateListResponse::Data::Template} for more details.
|
|
215
|
+
#
|
|
216
|
+
# Template response for v3 API
|
|
217
|
+
#
|
|
218
|
+
# @param customer_id [String] Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
219
|
+
#
|
|
220
|
+
# @param id [String] Unique template identifier
|
|
221
|
+
#
|
|
222
|
+
# @param category [String] Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
223
|
+
#
|
|
224
|
+
# @param channels [Array<String>, nil] Supported channels: sms, whatsapp
|
|
225
|
+
#
|
|
226
|
+
# @param created_at [Time] When the template was created
|
|
227
|
+
#
|
|
228
|
+
# @param is_published [Boolean] Whether the template is published and active
|
|
229
|
+
#
|
|
230
|
+
# @param language [String] Template language code (e.g., en_US)
|
|
231
|
+
#
|
|
232
|
+
# @param name [String] Template display name
|
|
233
|
+
#
|
|
234
|
+
# @param status [String] Template status: APPROVED, PENDING, REJECTED
|
|
235
|
+
#
|
|
236
|
+
# @param updated_at [Time, nil] When the template was last updated
|
|
237
|
+
#
|
|
238
|
+
# @param variables [Array<String>, nil] Template variables for personalization
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# @see Sentdm::Models::TemplateListResponse#error
|
|
243
|
+
class Error < Sentdm::Internal::Type::BaseModel
|
|
244
|
+
# @!attribute code
|
|
245
|
+
# Machine-readable error code (e.g., "RESOURCE_001")
|
|
246
|
+
#
|
|
247
|
+
# @return [String, nil]
|
|
248
|
+
optional :code, String
|
|
249
|
+
|
|
250
|
+
# @!attribute details
|
|
251
|
+
# Additional validation error details (field-level errors)
|
|
252
|
+
#
|
|
253
|
+
# @return [Hash{Symbol=>Array<String>}, nil]
|
|
254
|
+
optional :details, Sentdm::Internal::Type::HashOf[Sentdm::Internal::Type::ArrayOf[String]], nil?: true
|
|
255
|
+
|
|
256
|
+
# @!attribute doc_url
|
|
257
|
+
# URL to documentation about this error
|
|
258
|
+
#
|
|
259
|
+
# @return [String, nil]
|
|
260
|
+
optional :doc_url, String, nil?: true
|
|
261
|
+
|
|
262
|
+
# @!attribute message
|
|
263
|
+
# Human-readable error message
|
|
264
|
+
#
|
|
265
|
+
# @return [String, nil]
|
|
266
|
+
optional :message, String
|
|
267
|
+
|
|
268
|
+
# @!method initialize(code: nil, details: nil, doc_url: nil, message: nil)
|
|
269
|
+
# Error information
|
|
270
|
+
#
|
|
271
|
+
# @param code [String] Machine-readable error code (e.g., "RESOURCE_001")
|
|
272
|
+
#
|
|
273
|
+
# @param details [Hash{Symbol=>Array<String>}, nil] Additional validation error details (field-level errors)
|
|
274
|
+
#
|
|
275
|
+
# @param doc_url [String, nil] URL to documentation about this error
|
|
276
|
+
#
|
|
277
|
+
# @param message [String] Human-readable error message
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# @see Sentdm::Models::TemplateListResponse#meta
|
|
281
|
+
class Meta < Sentdm::Internal::Type::BaseModel
|
|
282
|
+
# @!attribute request_id
|
|
283
|
+
# Unique identifier for this request (for tracing and support)
|
|
284
|
+
#
|
|
285
|
+
# @return [String, nil]
|
|
286
|
+
optional :request_id, String
|
|
287
|
+
|
|
288
|
+
# @!attribute timestamp
|
|
289
|
+
# Server timestamp when the response was generated
|
|
290
|
+
#
|
|
291
|
+
# @return [Time, nil]
|
|
292
|
+
optional :timestamp, Time
|
|
293
|
+
|
|
294
|
+
# @!attribute version
|
|
295
|
+
# API version used for this request
|
|
296
|
+
#
|
|
297
|
+
# @return [String, nil]
|
|
298
|
+
optional :version, String
|
|
299
|
+
|
|
300
|
+
# @!method initialize(request_id: nil, timestamp: nil, version: nil)
|
|
301
|
+
# Request and response metadata
|
|
302
|
+
#
|
|
303
|
+
# @param request_id [String] Unique identifier for this request (for tracing and support)
|
|
304
|
+
#
|
|
305
|
+
# @param timestamp [Time] Server timestamp when the response was generated
|
|
306
|
+
#
|
|
307
|
+
# @param version [String] API version used for this request
|
|
62
308
|
end
|
|
63
309
|
end
|
|
64
310
|
end
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
# @see Sentdm::Resources::Templates#retrieve
|
|
6
|
+
class TemplateRetrieveResponse < Sentdm::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Template response for v3 API
|
|
9
|
+
#
|
|
10
|
+
# @return [Sentdm::Models::TemplateRetrieveResponse::Data, nil]
|
|
11
|
+
optional :data, -> { Sentdm::Models::TemplateRetrieveResponse::Data }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute error
|
|
14
|
+
# Error information
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::TemplateRetrieveResponse::Error, nil]
|
|
17
|
+
optional :error, -> { Sentdm::Models::TemplateRetrieveResponse::Error }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Request and response metadata
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::TemplateRetrieveResponse::Meta, nil]
|
|
23
|
+
optional :meta, -> { Sentdm::Models::TemplateRetrieveResponse::Meta }
|
|
24
|
+
|
|
25
|
+
# @!attribute success
|
|
26
|
+
# Indicates whether the request was successful
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :success, Sentdm::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(data: nil, error: nil, meta: nil, success: nil)
|
|
32
|
+
# Standard API response envelope for all v3 endpoints
|
|
33
|
+
#
|
|
34
|
+
# @param data [Sentdm::Models::TemplateRetrieveResponse::Data, nil] Template response for v3 API
|
|
35
|
+
#
|
|
36
|
+
# @param error [Sentdm::Models::TemplateRetrieveResponse::Error, nil] Error information
|
|
37
|
+
#
|
|
38
|
+
# @param meta [Sentdm::Models::TemplateRetrieveResponse::Meta] Request and response metadata
|
|
39
|
+
#
|
|
40
|
+
# @param success [Boolean] Indicates whether the request was successful
|
|
41
|
+
|
|
42
|
+
# @see Sentdm::Models::TemplateRetrieveResponse#data
|
|
43
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
44
|
+
# @!attribute customer_id
|
|
45
|
+
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
46
|
+
# Says whose resource this is, which the resource's own id does not.
|
|
47
|
+
#
|
|
48
|
+
# @return [String]
|
|
49
|
+
required :customer_id, String
|
|
50
|
+
|
|
51
|
+
# @!attribute id
|
|
52
|
+
# Unique template identifier
|
|
53
|
+
#
|
|
54
|
+
# @return [String, nil]
|
|
55
|
+
optional :id, String
|
|
56
|
+
|
|
57
|
+
# @!attribute category
|
|
58
|
+
# Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
optional :category, String
|
|
62
|
+
|
|
63
|
+
# @!attribute channels
|
|
64
|
+
# Supported channels: sms, whatsapp
|
|
65
|
+
#
|
|
66
|
+
# @return [Array<String>, nil]
|
|
67
|
+
optional :channels, Sentdm::Internal::Type::ArrayOf[String], nil?: true
|
|
68
|
+
|
|
69
|
+
# @!attribute created_at
|
|
70
|
+
# When the template was created
|
|
71
|
+
#
|
|
72
|
+
# @return [Time, nil]
|
|
73
|
+
optional :created_at, Time
|
|
74
|
+
|
|
75
|
+
# @!attribute is_published
|
|
76
|
+
# Whether the template is published and active
|
|
77
|
+
#
|
|
78
|
+
# @return [Boolean, nil]
|
|
79
|
+
optional :is_published, Sentdm::Internal::Type::Boolean
|
|
80
|
+
|
|
81
|
+
# @!attribute language
|
|
82
|
+
# Template language code (e.g., en_US)
|
|
83
|
+
#
|
|
84
|
+
# @return [String, nil]
|
|
85
|
+
optional :language, String
|
|
86
|
+
|
|
87
|
+
# @!attribute name
|
|
88
|
+
# Template display name
|
|
89
|
+
#
|
|
90
|
+
# @return [String, nil]
|
|
91
|
+
optional :name, String
|
|
92
|
+
|
|
93
|
+
# @!attribute status
|
|
94
|
+
# Template status: APPROVED, PENDING, REJECTED
|
|
95
|
+
#
|
|
96
|
+
# @return [String, nil]
|
|
97
|
+
optional :status, String
|
|
98
|
+
|
|
99
|
+
# @!attribute updated_at
|
|
100
|
+
# When the template was last updated
|
|
101
|
+
#
|
|
102
|
+
# @return [Time, nil]
|
|
103
|
+
optional :updated_at, Time, nil?: true
|
|
104
|
+
|
|
105
|
+
# @!attribute variables
|
|
106
|
+
# Template variables for personalization
|
|
107
|
+
#
|
|
108
|
+
# @return [Array<String>, nil]
|
|
109
|
+
optional :variables, Sentdm::Internal::Type::ArrayOf[String], nil?: true
|
|
110
|
+
|
|
111
|
+
# @!method initialize(customer_id:, id: nil, category: nil, channels: nil, created_at: nil, is_published: nil, language: nil, name: nil, status: nil, updated_at: nil, variables: nil)
|
|
112
|
+
# Some parameter documentations has been truncated, see
|
|
113
|
+
# {Sentdm::Models::TemplateRetrieveResponse::Data} for more details.
|
|
114
|
+
#
|
|
115
|
+
# Template response for v3 API
|
|
116
|
+
#
|
|
117
|
+
# @param customer_id [String] Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
118
|
+
#
|
|
119
|
+
# @param id [String] Unique template identifier
|
|
120
|
+
#
|
|
121
|
+
# @param category [String] Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
122
|
+
#
|
|
123
|
+
# @param channels [Array<String>, nil] Supported channels: sms, whatsapp
|
|
124
|
+
#
|
|
125
|
+
# @param created_at [Time] When the template was created
|
|
126
|
+
#
|
|
127
|
+
# @param is_published [Boolean] Whether the template is published and active
|
|
128
|
+
#
|
|
129
|
+
# @param language [String] Template language code (e.g., en_US)
|
|
130
|
+
#
|
|
131
|
+
# @param name [String] Template display name
|
|
132
|
+
#
|
|
133
|
+
# @param status [String] Template status: APPROVED, PENDING, REJECTED
|
|
134
|
+
#
|
|
135
|
+
# @param updated_at [Time, nil] When the template was last updated
|
|
136
|
+
#
|
|
137
|
+
# @param variables [Array<String>, nil] Template variables for personalization
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see Sentdm::Models::TemplateRetrieveResponse#error
|
|
141
|
+
class Error < Sentdm::Internal::Type::BaseModel
|
|
142
|
+
# @!attribute code
|
|
143
|
+
# Machine-readable error code (e.g., "RESOURCE_001")
|
|
144
|
+
#
|
|
145
|
+
# @return [String, nil]
|
|
146
|
+
optional :code, String
|
|
147
|
+
|
|
148
|
+
# @!attribute details
|
|
149
|
+
# Additional validation error details (field-level errors)
|
|
150
|
+
#
|
|
151
|
+
# @return [Hash{Symbol=>Array<String>}, nil]
|
|
152
|
+
optional :details, Sentdm::Internal::Type::HashOf[Sentdm::Internal::Type::ArrayOf[String]], nil?: true
|
|
153
|
+
|
|
154
|
+
# @!attribute doc_url
|
|
155
|
+
# URL to documentation about this error
|
|
156
|
+
#
|
|
157
|
+
# @return [String, nil]
|
|
158
|
+
optional :doc_url, String, nil?: true
|
|
159
|
+
|
|
160
|
+
# @!attribute message
|
|
161
|
+
# Human-readable error message
|
|
162
|
+
#
|
|
163
|
+
# @return [String, nil]
|
|
164
|
+
optional :message, String
|
|
165
|
+
|
|
166
|
+
# @!method initialize(code: nil, details: nil, doc_url: nil, message: nil)
|
|
167
|
+
# Error information
|
|
168
|
+
#
|
|
169
|
+
# @param code [String] Machine-readable error code (e.g., "RESOURCE_001")
|
|
170
|
+
#
|
|
171
|
+
# @param details [Hash{Symbol=>Array<String>}, nil] Additional validation error details (field-level errors)
|
|
172
|
+
#
|
|
173
|
+
# @param doc_url [String, nil] URL to documentation about this error
|
|
174
|
+
#
|
|
175
|
+
# @param message [String] Human-readable error message
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see Sentdm::Models::TemplateRetrieveResponse#meta
|
|
179
|
+
class Meta < Sentdm::Internal::Type::BaseModel
|
|
180
|
+
# @!attribute request_id
|
|
181
|
+
# Unique identifier for this request (for tracing and support)
|
|
182
|
+
#
|
|
183
|
+
# @return [String, nil]
|
|
184
|
+
optional :request_id, String
|
|
185
|
+
|
|
186
|
+
# @!attribute timestamp
|
|
187
|
+
# Server timestamp when the response was generated
|
|
188
|
+
#
|
|
189
|
+
# @return [Time, nil]
|
|
190
|
+
optional :timestamp, Time
|
|
191
|
+
|
|
192
|
+
# @!attribute version
|
|
193
|
+
# API version used for this request
|
|
194
|
+
#
|
|
195
|
+
# @return [String, nil]
|
|
196
|
+
optional :version, String
|
|
197
|
+
|
|
198
|
+
# @!method initialize(request_id: nil, timestamp: nil, version: nil)
|
|
199
|
+
# Request and response metadata
|
|
200
|
+
#
|
|
201
|
+
# @param request_id [String] Unique identifier for this request (for tracing and support)
|
|
202
|
+
#
|
|
203
|
+
# @param timestamp [Time] Server timestamp when the response was generated
|
|
204
|
+
#
|
|
205
|
+
# @param version [String] API version used for this request
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
end
|